Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to setvalue for DataGridCheckBoxColumn CheckBox.CommandProperty using code not xaml in wpf.

$
0
0

Hi,

I am creating a DataGrid dynamically. And one of the column of type DataGridCheckBoxColumn. For header also I need a checkbox. For that I am setting header template. And also attaching an event hanlder for Command. This is working fine for header click. But coming to content check boxes, event handler is not getting fired. Actually this handler is available in the view model of datagrid datacontext. I am trying like below.

DataGridCheckBoxColumn.SetValue(Checkbox.CommandProperty, a_columnCommand).

Here a_ColumnCommand is a delegateCommand.

But this is not firing the attached command.

Regards,

Mohana.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>