Hi,
I have couple of button in each row that have routed command attached with them. The problem that I am having is when data in grid is scrolled up or down using mouse wheel, buttons don't invalidate themselves unless I click on that row.
Is there any DataRecord's property or event that tells record is in view, if there is I can probably call CommandManager.InvalidateRequerySuggested(); to re evaluate canexecute method. or otherwise How can I solve this?
Thanks,
Imad.
Hello Imad,
Here you can read about the Routing strategies of the WPF event:
http://msdn.microsoft.com/en-us/library/ms742806.aspx#routing_strategies
where it explained about the Direct events.
RecordsInViewChanged was not working but RecordsInViewChangedDirect worked. Whats the difference between both? Is using RecordsInViewChangedDirect fine?
Infragistics web help for both events have same description "Occurs after the set of Records in view has changed."
I have created a sample project for you where everything seems to work ok on my side and the RecordsInViewChanged event fires as expected. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
RecordsInViewChanged is not getting invoked at all, on either scrolling through scroll bar or mouse wheel. Do I need to set anything else as well for this to work. Please help.
Thank you for your post. I have been looking into it and I can say that the XamDataGrid has an event called RecordsInViewChanged, which fires when scrolling. Please let me know if this helps you or you need further assistance on this matter.