PiotrR
PiotrR

Reputation: 105

How to find out when DevExpress XtraGrid row visibility changes?

Is there easy way to find out when DevExpress XtraGrid rows visibility changes?

I am using WinForms DevExpress XtraGrid. I need to know which rows are visible. I can find out which rows are visible at the moment, but I do not want to calculate it every time. So I calculate it when needed, store it, and invalidate if operation that can change visibility occurs. Which is scroll, resizing control, sorting, grouping, expanding or collapsing group, filter change, add or remove of item in data source, or change to item in data source when grid is sorted or filtered.

As you can see it became pretty ugly. Is there easier way to notice changes of visibility of rows? Is there event when row changes visibility or moves for any reason?

Upvotes: 1

Views: 483

Answers (1)

Maciej Nowicki
Maciej Nowicki

Reputation: 347

Unfortunately there is no event able to handle behaviour you've described - you have to handle number of events (sorting,grouping, etc.) and call function recalculating set of visible rows in each of them.

Regards,

Maciej Nowicki

Upvotes: 1

Related Questions