Firing event when GridDataColumnStyle CellType="CheckBox" is checked
Hi Massi,
We are sorry for the delay
We have analyzed your query. If you want to handle checkbox
clicked event,you have to hook the CurrentCellChanged event. You can refer the
below codesnippet to achieve your requirement.
Codesnippet[C#]:
|
this.syncgrid.CurrentCellChanged
+= new Syncfusion.Windows.ComponentModel.GridRoutedEventHandler(syncgrid_CurrentCellChanged); void syncgrid_CurrentCellChanged(object sender, Syncfusion.Windows.ComponentModel.SyncfusionRoutedEventArgs args) { var
currentcellmanager = this.syncgrid.Model.CurrencyManager; if
(currentcellmanager.CurrentCell.HasCurrentCell) { var
currentcell = currentcellmanager.CurrentCell; if
(currentcell.Renderer is GridCellCheckboxRenderer) { var value = currentcell.Renderer.ControlValue as bool?; if
((bool)value) { MessageBox.Show("checkbox
selected"); } else { MessageBox.Show("checbox
unselected"); } } } }
|
We have prepared sample based on your requirement
and please find the attachment sample below.
Please let us know if you have any queries,
Regards,
Saravanan.M
GridDataControl_checkbox_Eventhandle_ff0ff7ce.zip
- 1 Reply
- 2 Participants
-
MA Massi
- Oct 3, 2013 03:00 PM UTC
- Nov 19, 2013 10:18 AM UTC