We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridDataboundGrid - Merge duplicate cells

Hi, I have duplicate row values within a column of my databound grid. How do I merge these cells. Thanks Iain

3 Replies

AD Administrator Syncfusion Team September 22, 2005 12:52 PM UTC

Hi Iain, Please refer this sample that merges duplicate cells in a GridDataBoundGrid. MergeCells_GDBG.zip Best regards, Jay N


IJ Iain Jolly September 22, 2005 01:59 PM UTC

Hi, thanks - this worked well. Is there any way that I can set the merged rows to a different color? Thanks Iain


AD Administrator Syncfusion Team September 23, 2005 12:53 PM UTC

Hi Iain, You can set the backcolor in PrepareViewStyleInfo. private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { if(e.ColIndex == 2) { if(e.RowIndex == 6) e.Style.BackColor = Color.Pink; else if(e.RowIndex == 11) e.Style.BackColor = Color.LightGreen; } } Best regards, Jay N

Loader.
Live Chat Icon For mobile
Up arrow icon