Hi Touqeer,
This can be achieved by handling the CellClick event of the grid and use Model.Selection property to add the selection in a grid. The following is the code snippet.
private void gridDataBoundGrid1_CellClick(object sender, GridCellClickEventArgs e)
{
if( e.RowIndex == 0 )
{
e.Cancel = true;
GridDataBoundGrid grid = sender as GridDataBoundGrid;
grid.Model.Selections.Clear(true);
GridRangeInfo info = grid.Model.CoveredRanges.FindRange(e.RowIndex,e.ColIndex);
grid.Model.Selections.Add(GridRangeInfo.Cols(info.Left,info.Right));
}
if( e.RowIndex == 1 )
{
e.Cancel = true;
GridDataBoundGrid grid = sender as GridDataBoundGrid;
grid.Model.Selections.Clear(true);
grid.Model.Selections.Add(GridRangeInfo.Cells(1,e.ColIndex,grid.Model.RowCount,e.ColIndex ));
}
}
Please refer to the attached sample for implementation.
GDBGMultiHeader.zipBest regards,
Haneef