Hi ejaz,
Thank you for your details.
You can use the CoveredCells collection in the grid to merge cells at different rows and columns by passing the Cells/Cell, Cols/Col
and Rows/Row in GridRangeInfo.
Please refer this code snippets:
this.gridGroupingControl1.TableModel.CoveredRanges.Add(GridRangeInfo.Cells(4, 1, 4, 2));
this.gridGroupingControl1.TableModel.CoveredRanges.Add(GridRangeInfo.Cells(6, 3, 6, 4));
You can format the covered cells by handling the QueryCellStyleInfo event and set the required styles.
void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if ((e.TableCellIdentity.RowIndex == 4 && e.TableCellIdentity.ColIndex == 1)
||(e.TableCellIdentity.RowIndex == 6 && e.TableCellIdentity.ColIndex == 3))
{
e.Style.Font.Bold = true;
e.Style.Font.Facename = "Arial";
e.Style.Font.Size = 12;
e.Style.BackColor = Color.Pink;
}
}
Please refer the sample which illustrates the above said feature:
http://websamples.syncfusion.com/samples/Grid.Windows/F67076/main.htmThank you for using Syncfusion Products.
Best Regards,
Jeba.