I use UltraDataSource as UltraGrid.DataSource (version 7.1).
How to showing first 100 rows in Grid and other rows hide (as does FilterRow)?
TNX.
There are 2 ways you could go about doing this:
1) Use InitializeRow:
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e){ if (e.Row.Index >= 100) e.Row.Hidden = true;}
2) Use a custom FilterCondition:
private class First100RowsCondition : FilterCondition{ public override bool MeetsCriteria(UltraGridRow row) { return row.Index < 100; }}private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e){ e.Layout.Bands[0].ColumnFilters[0].FilterConditions.Add(new First100RowsCondition());}
-Matt