Reputation: 85
I am using C1 flexgrid in vb.net for windows form project At my form I want to merge rows of column when data are same that I dynamically filled from Database. How can I merge row of column in c1 flex grid
Upvotes: 0
Views: 4200
Reputation: 3363
Please refer this ComponentOne HelpCentral article
The C1FlexGrid control allows you to merge cells, making them span multiple rows or columns. This capability can be used to enhance the appearance and clarity of the data displayed on the grid. The effect of these settings is similar to the HTML and tags.
To enable cell merging, you must do two things:
Merging will occur if adjacent cells contain the same non-empty string. There is no method to force a pair of cells to merge. The merging is done automatically based on the cell contents. This makes it easy to provide merged views of sorted data, where values in adjacent rows present repeated data.
Cell merging works the same way when the grid is bound to a data source.
The code below shows an example for a grid bound to a data source at design time.
Private Sub Form1_Load(sender As Object, e As EventArgs)
Dim i As Integer
_flex.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictCols
For i As Integer = _flex.Cols.Fixed To _flex.Cols.Count - 1
_flex.Cols(i).AllowMerging = True
Next
End Sub
Upvotes: 2