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

Value in Visible Cell Part after merging

Well I need to show Cell Value in Visible Cell Part after merging cells in NON Virtual Grid after Scrolling.

6 Replies

HA haneefm Syncfusion Team July 16, 2007 03:42 PM UTC

Hi Raj,

The grid actually has two ways to merge the cells in a grid to display as one large cell. The first technique is coverd cells where an explicit merge the cells can be made to behave like a single cell. Covered cells are when you want several cells in a rectangle to behave and look like a single large cell. This large cell has its properties set by the top left small cell. You provide a specific reactangular range to cells that you want to cover.

[c#]
this.gridControl1[2,1].Text="Merging Three Cells in a Row";
this.gridControl1.CoveredRanges.Add(Syncfusion.Windows.Forms.Grid.GridRangeInfo.Cells(2,1,2,3));

The second technique is merged cells where adjacent cells that hold duplicate values as group together so you only see the value once. Merge cells occur when consecutive cells (either horizontally or vertically, but not both) have the same value. Setting merge cells will take these consecutive cells with the same value (or same style depending upon settings), and display it as a single large cell. So, you really do not specify a range per se. Instead the range is determined by the like values in the cell.

See this forum thread:http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=21667

Best regards,
Haneef


RA Rajinder July 17, 2007 05:32 AM UTC

Thanks Haneef for ur Reply. but this did not solve my problem. I'm merging cells (Rows in Columns) in NON VIRTUAL GRID.now problem i've is,
Suppose i have 10 Rows in a column having same values. I'm able to merge these cells.
now suppose my grid has 1000 rows. now when i scroll the grid, the merge cell value does not remain in visible cell part. so i see blank cell. There is a sample in Syncfusion help. but it is for virtual Cells. I need that code for NON Virtual Cells.

Please help me.


HA haneefm Syncfusion Team July 17, 2007 11:10 PM UTC

Hi Raj,

You could subscribe to the QueryCanMergeCells to customize the way you want to display the merge cells.

this.grid.Model.QueryCanMergeCells +=new GridQueryCanMergeCellsEventHandler(Model_QueryCanMergeCells);

private void Model_QueryCanMergeCells(object sender, GridQueryCanMergeCellsEventArgs e)
{

}

Best regards,
Haneef


RA Rajinder July 18, 2007 07:22 AM UTC

Well Well.. I`m stuck with same problem again. please refer to the sample VirtualMergeCell in the Samples provided with Syncfusion Essential Studio. in that sample first three cells are virtual. if we check the checkbox under the grid, then the values in first three cells remain in visible part of the cells after scrolling.. but not in other cells as they are NON Virtual cells.

My Problem is , How can i do the same thing with Non Virtual Cells.. I Hope u Understand my problem this time...



RA Rajinder July 19, 2007 07:22 AM UTC

Please Someone Help Me !!!!


JS Jeba S Syncfusion Team July 20, 2007 06:14 AM UTC

Hi Raj,

I apologize for the delay in responding.

Thank you for your update. The VirtualMergeCell sample uses the frozen count technique to prevent the text from scrolling out of view. You can also use the same frozen count technique to keep the values in visible part of the cells after scrolling. Please refer this code snippet:


this.gridControl1.Cols.FrozenCount = 2;


Please refer the sample in the below link which illustrates the above:
http://websamples.syncfusion.com/samples/Grid.Windows/I35639Two/main.htm

Kindly let us know if you need any further assistance.

Best Regards,
Jeba.

Loader.
Live Chat Icon For mobile
Up arrow icon