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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Why this code doesn''t work | Merge issue

Thread ID:





73099 Apr 19,2008 09:32 AM UTC Apr 20,2008 07:48 PM UTC WinForms 4
Tags: GridControl
Asked On April 19, 2008 09:32 AM UTC

i am trying to merge some cells using this code but it doesn't seem to work .. can anyone please tell me why ??

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Grid.ColWidths(0) = 0
Grid.ColCount = 4
Grid.NumberedColHeaders = False
Grid.NumberedRowHeaders = False
Grid.Model.Rows.HeaderCount = 1
Grid.Model.RowCount = 2

Grid(0, 1).Text = "Test Merging 2 cells"
Grid(1, 1).Text = "Test Merging 2 cells"
Grid(0, 1).HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center
Grid(0, 1).VerticalAlignment = Syncfusion.Windows.Forms.Grid.GridVerticalAlignment.Middle
Grid.ColWidths(1) = 250

Grid.Model.Options.MergeCellsMode = Syncfusion.Windows.Forms.Grid.GridMergeCellsMode.OnDemandCalculation Or Syncfusion.Windows.Forms.Grid.GridMergeCellsMode.MergeColumnsInRow Or Syncfusion.Windows.Forms.Grid.GridMergeCellsMode.MergeRowsInColumn
Grid.CoGridyles(1).MergeCell = Syncfusion.Windows.Forms.Grid.GridMergeCellDirection.RowsInColumn

End Sub

Replied On April 19, 2008 09:39 AM UTC

the last line is

Grid.ColStyles(1).MergeCell = Syncfusion.Windows.Forms.Grid.GridMergeCellDirection.RowsInColumn

Replied On April 19, 2008 04:25 PM UTC

project is attached please help


Replied On April 19, 2008 07:07 PM UTC

hello !!!

is there any way i can merge specific header cells ?

Replied On April 20, 2008 07:48 PM UTC

finally i knew how to do it with Model.CoveredRanges.Add((GridRangeInfo.Cells())

thanks anyway


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