Posted 18 November 2018, 8:21 am EST
Hi,
How to get the number of rows displayed in a FlexGrid after the user apply column filter?
Thanks in advance,
Ahmed
Forums Home / ComponentOne / WinForms Edition
Posted by: ahmdsalh on 18 November 2018, 8:21 am EST
Posted 18 November 2018, 8:21 am EST
Hi,
How to get the number of rows displayed in a FlexGrid after the user apply column filter?
Thanks in advance,
Ahmed
Posted 19 November 2018, 2:05 am EST
Hi Ahmed,
There is no direct method to get the count of displayed rows, however you can make your own method to do the same.
Here’s an example:
public static int VisibleDataRows(this C1.Win.C1FlexGrid.C1FlexGrid flex)
{
int rows = 0;
for (int row = flex.Rows.Fixed; row < flex.Rows.Count; ++row)
{
if (flex.Rows[row].IsVisible && !flex.Rows[row].IsNode && !flex.Rows[row].IsNew)
++rows;
}
return rows;
}
Please also refer to the attached sample for the same.
Regards,
Jitender
FilteredRowCount.zip