Processing of marker lines, interception of events of insertion and deletion of rows

Processing events mark the rows in GroupEdit

To treat check\ uncheck in lines GroupEdit:

  • To FlexGrid from GroupEdit.
  • Subscribe to the event CellChanged:
 fg.CellChanged-=new RowColEventHandler(fg_CellChanged); 
 fg.CellChanged+=new RowColEventHandler(fg_CellChanged); 
  • In the handler to check:
 private void fg_CellChanged(object sender, RowColEventArgs e)
C1.Win.C1FlexGrid.C1FlexGrid fg = (C1.Win.C1FlexGrid.C1FlexGrid)sender; 
if ((fg.GetData( e.Row,e.Col) is bool)&& (e.Col==1)) 
         if ((bool)fg.GetData( e.Row,e.Col))  {   MessageBox.Show("Checked!");    }  else   {   MessageBox.Show("UnChecked!");    } 

Interception of events of insertion/removal of an object in GroupEditBase

To intercept events from the delete and add object and under certain conditions these events to cancel in GroupEditBase, you can use two ways:

  1. You can control the delete button on the toolbar (show, hide)
  2. FlexGrid there is an event before deleting, which allows you to return to cancel the deletion
Переведено сервисом «Яндекс.Переводчик»