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

Why this code doesn''t work | Merge issue

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


4 Replies

NA NanoSofT April 19, 2008 09:39 AM UTC


the last line is

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



NA NanoSofT April 19, 2008 04:25 PM UTC

project is attached please help



Merge.zip


NA NanoSofT April 19, 2008 07:07 PM UTC

hello !!!

is there any way i can merge specific header cells ?



NA NanoSofT April 20, 2008 07:48 PM UTC


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

thanks anyway


Loader.
Live Chat Icon For mobile
Up arrow icon