I have a detail area that is bound to the ActiveDataItem in a grid. If I have a filter active and then change a value in the detail area it reflects properly in the grid, but the row does not move where it should. How do I reapply the active filter so that the row will be placed in its the area with the rest of the rows in that filter?
Thank you,
Mike Malter
Edited:
I found out how to force a refresh of the current sort and filter through the following calls:
this.dgPDUsers.RecordManager.Sorted[ this.GetCurrentRecordIndex() ].RefreshSortPosition(); this.dgPDUsers.RecordManager.Sorted[ this.GetCurrentRecordIndex() ].RefreshFilters();
However, I have this funky problem. I have a column called Active which can be either Yes or No. If I apply a filter to the column of Yes, and then sort that column, when I change a Yes to a No in the detail area, the cell value for the selected row is changed, but, instead of disappearing as I would suspect because that column is filtered for "Yes", instead, the row has a value of "No" and it floats to the top.
Any way around that?
Thanks.
Glad to hear, I could be of assistance.
Petar,
Nice abbreviation, thanks Petar, I will use this pattern.
Hello Mike,
I am really glad to hear that. I also thought that the RefreshSortPosition and RefreshFilters methods should do the trick, however I couldn’t see why it wasn’t working for you.
Also I assume “dr” is your records and I can suggest you access your methods like so:
(dr as DataRecord).RefreshSortPosition();
(dr as DataRecord).RefreshFilters();
Hope this helps. Let me know if I can help with anything else on the matter.
Yes, I found an answer elsewhere, thank you for checking back. This is what I had to do:
//// resort and refresh//this.dgPatients.RecordManager.Sorted[ dr.Index ].RefreshSortPosition();this.dgPatients.RecordManager.Sorted[ dr.Index ].RefreshFilters();
Now it works.
Mike
I am just checking if you got this worked out, or you still require any assistance on the matter.