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?
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.
Thank you. then how to get all rows of the XamGrid?