Hello Sushma,
I am glad I was able to help.
Please let me know if you have any other questions.
Sincerely,Valerie Developer Support Supervisor - XAMLInfragisticswww.infragistics.com/support
That's what seems to be happening in my case. The button being in ViewModel and with the virtualization of XamDataGrid, it keeps dancing around. It is working fine with having an enabled property. Thanks.
The XamDataGrid uses virtualization to enhance performance, therefore a cell value presenter that was previously used for a different cell may be recycled to use for a new cell when scrolling. Due to this, you should use a binding to the IsEnabled property of the button to ensure that the state is correct for the underlying data item. If you do not want to have this property in your underlying class (ex Person) you could bind the IsEnabled property to a unique value(s) in the person class and then use a converter to check if the button should be enabled.
Let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Instead of binding IsEnabled of the button separately, can't I directly bind to the DelegateCommand(Execute, CanExecute) and use the CanExecute to determine if my button must be enabled or not? Having IsEnabled in my DataSource again scatters my DelegateCommand's functionality with Execute in ViewModel and CanExecute in the DataSoucrce.
If you would like to move the command to the ViewModel, I would suggest adding a property to the person bound in ViewModel and use this property to bind the IsEnabled property of the button so that the button is automatically enabled/ disabled when the person can be updated.
See modified sample.
Please let me know if you have any questions.