Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4970
How to get the row date in checkbox event in template column?
posted

I set a CheckBox as template column in XamGrid like:

<ig:TemplateColumn Key="MyColumn">
     <ig:TemplateColumn.HeaderTemplate>
         <DataTemplate>
             <TextBlock  Text="{MyColumn}"/>
         </DataTemplate>
     </ig:TemplateColumn.HeaderTemplate>
     <ig:TemplateColumn.ItemTemplate>
         <DataTemplate>
             <CheckBox IsChecked="{Binding MyColumn, Mode=TwoWay}" Checked="CheckBox_Checked" />
         </DataTemplate>
     </ig:TemplateColumn.ItemTemplate>
 </ig:TemplateColumn>

then in code for event handler CheckBox_Checked, I want to get the row data of the current row when user click on the CheckBox. How can I do it?

 

 

 

Parents
No Data
Reply
  • 17559
    Verified Answer
    posted

    Hello benjaminswitzer,

     

    Also you can get the whole XamGrid row from the Clicked event as follows:

            private void CheckBox_Checked(object sender, RoutedEventArgs e)

            {

     

                ((sender as CheckBox).Parent as CellControl).Cell.Row.ToString();

            }

     

    If you need any additional assistance on this matter please let me know.

Children