已经设定某一列单元格为leftcenter 然后 怎莫设置 这一列的某一个单元格 rightcenter 。
Public Function CellRange(ByVal maxRows As Integer) As Boolean
sprDetailedSchedule.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Custom
Dim rng As CellRange = sprDetailedSchedule.GetCellRange(maxRows, 2, maxRows, 4)
rng.Style = sprDetailedSchedule.Styles("FirstCustomStyle")
rng.StyleNew.TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter
sprDetailedSchedule.MergedRanges.Add(rng)
Dim omg As CellRange = sprDetailedSchedule.GetCellRange(maxRows, 5, maxRows, 7)
omg.Style = sprDetailedSchedule.Styles("FirstCustomStyle")
omg.StyleNew.TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.RightCenter
sprDetailedSchedule.MergedRanges.Add(omg)
End Function
sprDetailedSchedule 为我的表格名称。
|
|