Maybe I'm blind but I cannot find a topic in the official doc explaining how to retrieve the number of returned rows when using the SearchAsType functionality.

Is it possible ?


[iGrid.NET version X]
No, this information is not available as a public property. We thought about adding such a property in iGrid.NET X, but it turned out that the number of visible rows varies for the same grid in different contexts and one property is not enough or it can be misinterpreted. You can wonder why - that's why.

In the simplest case, when iGrid contains only normal rows (no group rows), and if it is not a tree grid, the number of visible rows is almost obvious - it's the number of rows with the Visible status set to True. Right? Not fully. What about rows with 0 height? Add to this the situation of a grouped grid. Should we take into account group rows when we count visible rows? What if we collapse some group rows - should we count collapsed normal rows as visible? The same for a tree grid.

Most likely, we need a bunch of properties returning all possible row count metrics. What do you think?

P.S. Moving this discussion in the more appropriate Suggestions section. Perhaps, if this question becomes more clear, we'll implement a property or properties for row counts in the future updates.
Hi Igor,

I understand perfectly what you are describing.
But it is still surprising that this basic feature is absent.

A searching method exists but it is not possible to know the number of rows returned... A bit strange :)

So I hope that this feature will be implemented in the next update.
You did not answer how you see this feature. Is one property that returns the number of visible rows regardless of their collapsed status, type (group row) enough?

As for the SearchAsType object, it is also used for search, not only for filtering, and no wonder that it does not provide you with the information about visible row count. AutoFilterManager is another specialized solution to filter rows, and it does provide you with the value you expect in its FilterApplied event.
Hi Igor,

You know, the way I use Igrid is really basic :

IGrid.SearchAsType.SearchText = myText

After this line I just want to know how many lines are found (if any).

Your suggestion seems good to me : a property that returns the number of visible rows.