DataGrid not updating property when using "single click" CheckBox column

kerenshor

New member
Joined
Jan 23, 2016
Messages
4
Programming Experience
1-3
I am using a Datagrid in MVVM, and I want to remove the "double click" behavior of the Standard DataGrid, which contains one Checkbox-Column (inside a DataTemplateColumn) and another two regular columns, as follows:

Pic.jpg


Unfortunately, the CheckBox column works fine (single click), but clicking the CheckBox is not reflected in the IsSelected property. How can this problem be solved?
 
Perhaps I am missing something, but it looks like you are simply using the checkbox as a way of tracking whether a row is selected or not. If I recall correctly, the DataGrid follows the standard Windows behavior that allows you to select one or more disjoint items using the Ctrl key and left clicking on the items you want add or remove from the selection. It also follows the standard Windows behavior that allows you to select one or more adjacent items using the Shift key and left clicking on the last item that you want to add or remove from the selection. In my opinion, the use of checkboxes to select items in a list or grid with checkboxes is the way web designers do things because that's the only option they have (had?) available to them. Why are you trying to do a Web UI style GUI on a Windows GUI application?
 
Perhaps I am missing something, but it looks like you are simply using the checkbox as a way of tracking whether a row is selected or not. If I recall correctly, the DataGrid follows the standard Windows behavior that allows you to select one or more disjoint items using the Ctrl key and left clicking on the items you want add or remove from the selection. It also follows the standard Windows behavior that allows you to select one or more adjacent items using the Shift key and left clicking on the last item that you want to add or remove from the selection. In my opinion, the use of checkboxes to select items in a list or grid with checkboxes is the way web designers do things because that's the only option they have (had?) available to them. Why are you trying to do a Web UI style GUI on a Windows GUI application?
I prefer the checkboxes way, since it is much easier to control various selections. Anyway, since I have problem with reflection of selected checkboxes in the property, my interest of solving it increase greatly.
 
I prefer the checkboxes way
And this is part of the reason why people don't like Windows: they complain that Windows apps have such a disjoint look and feel versus the more unified look and feel of MacOS apps. Windows programmers ignore the Windows UI design guidelines, while Mac programmers cling to the Mac UI guidelines.
 
Anyway, with regards to the binding, did you set breakpoints on your property to see if the setter is being called?
 

Latest posts

Back
Top Bottom