Combining two Grid Cells together

Using the unbound grid control What is the easiest way to merge two grid cells in the same row together and center the text between the two?

1 Reply

AD Administrator Syncfusion Team February 24, 2005 07:44 PM UTC

Use grid.CoveredRanges.Add(GridRangeInfo.Cell(2,2,2,3)); to cover cells 2 and 3 on row 2. You then set the style for this covered cell by setting the style on cell 2,2 (the top-left cell of teh covered range). If you want to center teh text, you would set grid[2,2].HorizontalAlignment = GridHorizontalAlignment.Center;

Loader.
Up arrow icon