DataGrid - can I make its rows 'unselectable'?

Mar 25, 2009 at 5:00 PM
Hello,
I have a DataGrid which I have bound to a DataTable containing boolean values which it has rendered as checkboxes, exactly as I want. However, my problem is that when I click on one of the checkboxes, the first click simply selects the row that the checkbox is on, then it takes another click to check/uncheck the checkbox.
I can override the style of the DataGridCell in xaml to prevent it showing the blue background when a row is selected, but this doesn't get over the problem of it taking two clicks to check or uncheck a checkbox, because the first one is selecting the row.
Is there any way of making it so that the rows are 'unselectable', that is, ideally so that the DataGrid has no concept of a 'selected' row, and that clicking on any checkbox will check/uncheck it?
Thanks

Coordinator
Mar 26, 2009 at 8:44 PM
Use this http://wpf.codeplex.com/Wiki/View.aspx?title=Single-Click%20Editing&referringTitle=Tips%20%26%20Tricks (single click editing) along with setting the highlight color to transparent. It is as good as disabling selection for an end user.
Mar 27, 2009 at 9:39 AM
That works great, thanks very much