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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Steps to merge data in cells

Thread ID:





5674 Jul 14,2003 01:08 AM UTC Jul 15,2003 10:39 AM UTC WinForms 4
Tags: GridControl
Administrator [Syncfusion]
Asked On July 14, 2003 01:08 AM UTC

It might be simple but I haven't found any simple guide about mergind data in a grid. Could you please provide a list of steps for merging data in a GridDataBoundGrid? I tried the following but it didn't work. 1) enabling merge option in grid gridDataBoundGrid1.Model.Options.MergeCellsMode = GridMergeCellsMode.MergeRowsInColumn; 2) declaring column to be merged gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo.MergeCell = GridMergeCellDirection.ColumnsInRow; Do I have to work around any specific event? TIA Jose.

Administrator [Syncfusion]
Replied On July 14, 2003 06:05 AM UTC

Try gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo.MergeCell = GridMergeCellDirection.RowsInColumn; if you want to merge cells vertically. Stefan

Administrator [Syncfusion]
Replied On July 15, 2003 09:53 AM UTC

Hello Stefan, I did the change but now a NullReferenceException is being thrown by Grid.GridModelMergeCells.Find Any ideas? Thanks

Administrator [Syncfusion]
Replied On July 15, 2003 10:12 AM UTC

> Hello Stefan, > > I did the change but now a NullReferenceException is being thrown by Grid.GridModelMergeCells.Find > > Any ideas? > > Thanks > For some reason, after I change the GridModel Options (this.gridDataBoundGrid1.Model.Options.MergeCellsMode = GridMergeCellsMode.BeforeDisplayCalculation|GridMergeCellsMode.MergeRowsInColumn;), there is no exception and it is showing up properly. Now, if I click on any of the merged cells I still see the value underneath. How can I hide those merged cell values? or better, Why the merge operation does not create only one cell merging all data values accordingly? Thanks

Administrator [Syncfusion]
Replied On July 15, 2003 10:39 AM UTC

You can avoid the cell to start editing and showing a value when clicked on by setting the celltype to static. gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo.CellType = "Static"; If you want it to be a single cell, then you probably should use CoveredCells instead of MergeCells. You can handle the QueryCoverdRange event and dynamically provide the range at that point.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon