I am trying to wire-up a click event to a checkbox column inside the RadGridview. My problem is that when I handle the click event of the check box the grid has not registered the selected item yet, so I can't access the record to obtain the value from another column for the record which was checked. Here is the click event code:
The SelectedItem property is null. So I need to handle the click event after the grid has processed the click. Just not quite sure yet how to do this.
Thanks,
-SId.
| private void CheckBox_Click(object sender, RoutedEventArgs e) |
| { |
| CheckBox chkbox = (CheckBox)sender; |
| ApplyPaymentEntity payment = new ApplyPaymentEntity(); |
| payment = (ApplyPaymentEntity)this.grdPmtDetail.SelectedItem; |
| if (chkbox.IsChecked == true) |
| { |
| AppliedAmount = AppliedAmount + (decimal)payment.BillBalance; |
| } |
| else |
| { |
| AppliedAmount = AppliedAmount - (decimal)payment.BillBalance; |
| } |
| } |
The SelectedItem property is null. So I need to handle the click event after the grid has processed the click. Just not quite sure yet how to do this.
Thanks,
-SId.
