Posted 14 November 2021, 12:45 pm EST
Hello, I have a question about the grid merge function.
For Row as integer = grid.Rows.Fixed To grid.Rows.Count - 1
Dim flag As Integer = grid.GetData(Row, “flag”)
Select Case flag
Case 1
range = grid.GetCellRange(Row, 2, Row, 7)
grid.MergedRanges.Add(range)
range = grid.GetCellRange(Row, 9, Row, 15)
grid.MergedRanges.Add(range)
If the source is coded in that way, the merge part is correct when inquiring the data for the first time.
However, if the next data is inquired, the current grid merge is applied in addition to the previous grid merge, and the merge values are mixed and inquired.
Is there a way to initialize the merge value every time it is inquired?