Dear Team, i have found another bug, this time it is very serious...
I will not ask you why such things are still left in the production, why noone is testing your code etc etc :)...
Taken directly from your "Syncfusion wpf-demos-master" project and tested with the version 20.1.0.59, the following is not working:
when i use the Selector column, the Selected property is not being updated, when the user selects an element on the grid. This is the sole purpose of this column to make things a bit funnier... Still this column doesnt work.
And the code of my test button:
var myDataContext = sfgrid.DataContext as EmployeeViewModel;
if (myDataContext != null)
{
MessageBox.Show($"You have selected {myDataContext.EmployeeDetails.Count(item => item.Selected)} grid elemenets");
}
#Edit1) Also when binding the SelectedItems property to any property in the ViewModel, it doesnt work as well. Only when accessing the property directly in the code behind it works.
#Edit2) Since the bindings dont work, there is a manual workaround, by setting the SelectedList on the ViewModel through the Grid's.SelectionChanged event. But, there is no way i found, to set the selectedItems of the grid, when loading an item again. Could you please provide me a workaround till you fix the problem with the bindings? Otherwise the whole grid is not usable at the moment when you want to select/deselect rows.
With regards
Your trusted tester
Fanourios Siskakis
Hi Fanourios Siskakis,
Please find the response for the reported issues below,
|
Reported issue |
Response |
|
when i use the Selector column, the Selected property is not being updated, when the user selects an element on the grid. This is the sole purpose of this column to make things a bit funnier... Still this column doesnt work.
|
|
|
|
We have analyzed the reported issue in our end. But we regret to let you know that the reported issue does not reproduce in our end. Here we have attached the tested sample for your reference. Please have a look on this. If you still facing the same issue, Modify the attached sample based on your scenario. It will be more helpful for us to check the possibilities to resolve the reported problem.
|
|
|
SfDataGrid.SelectedItems is a collection
property. So, whenever the SelectedItems collection is changed, the property
bound with SelectedItems does not get notified for this change. However, you
can achieve this by creating an attached property for SelectedItems. Here we
have published the KB for your requirement. |
Regards,
Dhanasekar M.
Hi Fanourios Siskakis,
We deeply regret for the inconvenience caused.
As we mentioned earlier, the GridCheckBoxSelectorColumn is unbound and do not require to bound with any properties from view model, but due to our internal structure, a dummy mapping name is needed. Mistakenly instead of dummy mapping name, a property from the underlying view model was bound in our demo application and we regret for the improper explanations in our previous update. We have updated the demo application now with removing the property binding from view model and these changes will be reflected in our upcoming Essential Studio main release which is expected to be rolled out within two weeks.
We appreciate your understandings.
Regards,
Dhanasekar M.