How I can run for loop only filtered rows into UltraGrid? Suppose I've a Ultra grid about 1000 rows. But I need only run loop for 5 rows which I shall get by filtering
foreach (UltraGridRow row in grdMerchandiserToBuyer.Rows)
{
}
This code fetch all rows, but I want only filtered Rows into this Grid
Please help me if anyone know that Thanks
CodePudding user response:
The UltraGrid.Rows property is of type RowsCollection, which has a method GetFilteredInNonGroupByRows. You should be able to do something like this:
foreach (UltraGridRow row in grdMerchaniserToBuyer.Rows.GetFilteredInNonGroupByRows())
{
// your code here
}
CodePudding user response:
If you have more than 5 filtered rows, but it's required to get only first five:
foreach (UltraGridRow row in grdMerchandiserToBuyer.Rows.GetFilteredInNonGroupByRows().Take(5))
{
...
}
