AfterEdit事件代码
If e.Col.Name = "第二列"
Dim tb As Table = e.Table
tb.Grid.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Custom
tb.grid.MergedRanges.Clear
Dim pidx As Integer = -1
For Each r As Row In tb.Rows
If r("第二列") = True Then
If pidx = -1 Then
pidx = r.Index + 1
End If
Else
If pidx <> -1 Then
Dim rng As C1.Win.C1FlexGrid.CellRange = tb.Grid.GetCellRange(pidx, 3, r.Index, 3)
tb.Grid.MergedRanges.Add(rng)
pidx = -1
End If
End If
Next
If pidx <> -1 Then
Dim rng As C1.Win.C1FlexGrid.CellRange = tb.Grid.GetCellRange(pidx, 3, tb.Rows.Count, 3)
tb.Grid.MergedRanges.Add(rng)
End If
End If