AD
Administrator
Syncfusion Team
July 31, 2004 06:13 AM UTC
Take a look at the Grid\Samples\DataBound\MultiHeader sample. It adds an unbound checkbox on the left side and an unbound column on the right side.
The steps are:
1) Add a GridBoundColumn in the GridBoundColumns collection (or Binder.InternalColumns if you have not explicitly added GridBoundColumns). In the sample, serach for "Unbound" to see this code.
2) Add some datastructure to hold the data that is to occupy this column. The sample uses a HashTable unboundValues. You would get yours directly from the second DataTable.
3) Handle the GridDataBoundGrid.Model.QueryCellInfo event to provide the values to the grid from your second DataTable for your unbound column. See ModelQueryCellInfo in the sample.
4) Handle the GridDataBoundGrid.Model.SaveCellInfo event to save the values from the unbound column to the second DataTable. See ModelSaveCellInfo in the sample.