Hi all,
I have a grid that should only show the top 5 rows. However, the data has more than 5 rows and there maybe occasions where I need to sort the grid with all the data, but just show the top 5 rows after sorting.
Is there a feature inUltraWinGrid that would allow me to do that?
If so, could you point me to it?
Thanks.
Raymond.
This worked for me:
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Index > 4) e.Row.Hidden = true; else e.Row.Hidden = false; } private void ultraGrid1_AfterSortChange(object sender, BandEventArgs e) { UltraGrid grid = (UltraGrid)e.Band.Layout.Grid; grid.Rows.Refresh(RefreshRow.FireInitializeRow); grid.ActiveRowScrollRegion.FirstRow = grid.Rows[0]; }