Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
XAMGrid Rows.CollectionChanged is always a Reset
posted

Hello,

In or application we use a xamgrid and we use the MVVM pattern. In the code behind I subscribe to the Rows.CollectionChanged because there is something I want to do at that point in code behind. But when I add an item to the source to which the xamgris ItemsSource is bound I see that I always get a Reset action and newItems and oldItems are allways null.

I modified one of your samples offered for a different issue but that already used the MVVM pattern. And I still see the same behavior.

Can you explain why it is so? I would expect to get the new Row and then be able to get its DataContext. And is there an alternative?

I attach here the modified sample.

https://emerson.sendthisfile.com/c.jsp?t=gtY9klGb8CcfbqA7zyjpxs8C&n=f2Tqhbjt7rlkH5lfFvXdbVvG

https://emerson.sendthisfile.com/f2Tqhbjt7rlkH5lfFvXdbVvG

Thank you.