Hello,
we have an application where we are tracking the user selection of a row in the xamDataGrid by binding the IsSelected XAML property to a special property on the datasource. Then, another function is that we want to switch the datagrid´s AllowEdit - which is done by the help of this method (http://www.codeproject.com/Articles/27432/Artificial-Inheritance-Contexts-in-WPF).
Now in combination the following problem appears: When a row is selected AND we switch AllowEdit to on or off, the application crashes.
We got a test case which is attached, maybe someone can take a look. Note: The binding on the setter property ({Binding DataItem.IsSelectedInGrid, Mode=TwoWay}) is set to TwoWay, the problem does not happen when switched to OneWay. However, we need the TwoWay functionality.
BR Florian
latest SR fixes the issues, we can confirm this. Thank you very much!
Florian,
I have created case for you with ID CAS-172776-F8D9K2 because we believe that the exception that you reported originally should be addressed and provide you with a resolution. To discuss this privately, you could reach your case following the link bellow:
https://es.infragistics.com/my-account/support-activity I will update you via the mentioned case, so if you have any further questions or comments please update your case.
Hello Andrew,
we can say that this is a workaround which will work for grids where only a single selection is used. Let me explain what we are actually doing with that binding:
- The xamGrid will have multiple rows selected by the user- The IsSelected property is bound backwards to the view model to a backing property "IsSelectedInGrid" to inform the view model about the user selection- The user triggers a command on the view instructing the viewmodel to e.g. delete multiple rows- The viewmodel will iterate through the data source and find all rows that have been selected by looking at the backing property
So now your workaround will work for us in 90% of our grids. But for some, it would still be cool to have the selection information relayed back to the viewmodel. IsActive will not help us with that, as only one row can be active at a time. Or dou you have another idea how to achieve this?
Hello Florian,
Thank you for your update. I will continue to monitor this forum thread and await your next response on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hello Michael,
plese let me confirm with my developers during the next days, I was too busy untiol now to take a look.
BR FLorian