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.
Unfortunately, activation email could not send to your email. Please try again.

Why this code doesn''t work | Merge issue

Thread ID:





73099 Apr 19,2008 05:32 AM Apr 20,2008 03:48 PM Windows Forms 4
Tags: GridControl
Asked On April 19, 2008 05:32 AM

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 05:39 AM

the last line is

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

Replied On April 19, 2008 12:25 PM

project is attached please help


Replied On April 19, 2008 03:07 PM

hello !!!

is there any way i can merge specific header cells ?

Replied On April 20, 2008 03:48 PM

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.

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.