locked
Finding DataGrid Row in Checkbox Click event inside Datagrid RRS feed

  • Question

  • Hi,

    I want to find DataGrid Row when I click checkbox.

    My checkbox is also inside the same Datagrid.

    Please tell the code.

    Thanks,

    Rahul

    Friday, May 18, 2012 9:46 AM

Answers

  • My checkbox is also inside the same Datagrid.

    in checked and unchecked event you will get the checkbox control and check box control gives you the datacontext of that row.

    var checkbox = sender as CheckBox;

    var myclass = checkbox.DataContext; (suppose the class myclass is you data class)

    by this way you will get the complete row.

    Friday, May 18, 2012 12:43 PM

All replies