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


in one Grid, Some column need GridMergeCellsMode.MergeRowsInColumn Some Column need GridMergeCellsMode.MergeColumnsInRow How can I do? Code now is(Only can choose one GridMergeCellsMode?): GridStyleInfo columnHeaderStyle = gridDataBoundGridMWV.Model.BaseStylesMap["Column Header"].StyleInfo; columnHeaderStyle.MergeCell = GridMergeCellDirection.Both; gridDataBoundGridMWV.Model.Options.MergeCellsMode = GridMergeCellsMode.OnDemandCalculation|GridMergeCellsMode.MergeRowsInColumn; gridDataBoundGridMWV.Model.Options.SmoothControlResize = false;

4 Replies

AD Administrator Syncfusion Team July 30, 2003 12:17 PM UTC

Are you trying to just merge the headers, or do you want to merge cells in the body of the grid. The code you showed only looked at the column headers an dnot the body of the grid. Doing the rows in the body of a GridDataBoundGrid will require some work as there are now 'row properties' stored in a griddataboundgrid. Instead, you would have to provide these styles dynamically in Model.QueryCellInfo. Alternatively, you could try setting the who tablestyle using grid.TableStyle to see if that will merge the rows as you need it. To set the merging for a column, you would set the style in the grid.Binder.InternalColumns[col].StyleInfo property. (Or, in the grid.GridBoundColumns[col].StyleInfo if you have explicitly added the GridBoundColumns).

CR Cradle July 30, 2003 12:31 PM UTC

you mean gridDataBoundGridMWV.Binder.InternalColumns[0].StyleInfo=GridMergeCellDirection.RowsInColumn; gridDataBoundGridMWV.Binder.InternalColumns[1].StyleInfo=GridMergeCellDirection.ColumnsInRow; then...?

AD Administrator Syncfusion Team July 30, 2003 02:45 PM UTC

Attached is a sample.

CR Cradle July 30, 2003 10:17 PM UTC

Clay, Thanks!!!!!

Live Chat Icon For mobile
Up arrow icon