WPF Toolkit Datagrid - how do you turn selection off?

后端 未结 2 1396
离开以前
离开以前 2020-12-31 10:07

I have a datagrid in WPF that I am binding to an object.

I have a DataGridCheckBoxColumn on there which I want the users to be able to go through and tick the ones

2条回答
  •  一个人的身影
    2020-12-31 10:49

    The first click puts the cell in edit mode then the second click allows you to modify the checkbox. You can change this behavior by using a DataGridTemplateColumn instead of a DataGridCheckBoxColumn. Replace your DataGridCheckBoxColumn with this:

    
       
          
             
          
       
    
    

    DataGridCheckBoxStyle just makes the CheckBox look a little nicer in the DataGrid:

    
    

提交回复
热议问题