以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  特定行的网格线?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=123639)

--  作者:lur320
--  发布时间:2018/8/20 10:12:00
--  特定行的网格线?
如何在特定行,例如汇总行。在单元格增加下方的网格线?

If e.Row.IsGroup=True Then
e.style="group"
e.Row.grid.styles.Normal.Border.Style = C1FlexGrid.BorderStyleEnum.Flat ?
e.Row.grid.styles.Normal.Border.width = 1   ?
End If

还是下面的代码怎么改改?
Dim cs1 As C1.Win.C1FlexGrid.CellStyle = CurrentTable.Grid.Styles.Add("Borderline")
Dim rng As C1.Win.C1FlexGrid.CellRange = CurrentTable.Grid.GetCellRange(1,2, 3,3) 怎么和e.row联系起来?
cs1.backcolor = color.yellow
cs1.forecolor = color.red
cs1.Border.Direction = 1
rng.style = cs1



--  作者:有点蓝
--  发布时间:2018/8/20 10:32:00
--  
Dim r As Row
For i As Integer = 0 To Tables("订单").Rows.Count(True) - 1
    r = Tables("订单").Rows(i,True)
    If r.IsGroup
        Dim cs1 As C1.Win.C1FlexGrid.CellStyle = CurrentTable.Grid.Styles.Add("Borderline")
        Dim rng As C1.Win.C1FlexGrid.CellRange = CurrentTable.Grid.GetCellRange(i+1,1, i+1,Tables("订单").Cols.Count) 
        cs1.backcolor = color.yellow
        cs1.forecolor = color.red
        cs1.Border.Color = color.red
        cs1.Border.Direction = 1
        rng.style = cs1
    End If
Next

--  作者:lur320
--  发布时间:2018/8/20 13:42:00
--  
这个可以正常显示,但是发现不能点击界面按钮了。
估计是写在了drawcell里面太频繁导致鼠标移入自定义下拉菜单后,点击了不出现下拉菜单。
有什么其他简单增加单元格下划线的办法么?
下面代码注释掉,正常运行;
加上,则显示下划线,但是界面菜单假死


If e.Row.IsGroup=True Then
    e.style="group"
    \'Dim cs1 As C1.Win.C1FlexGrid.CellStyle = CurrentTable.Grid.Styles.Add("Borderline")
    \'Dim cs2 As C1.Win.C1FlexGrid.CellStyle = CurrentTable.Grid.Styles.Add("Borderline1")
    \'Dim rng As C1.Win.C1FlexGrid.CellRange = CurrentTable.Grid.GetCellRange(e.Row.Index+2,1, e.Row.Index+2,CurrentTable.Cols.Count-1)
    \'Dim rng2 As C1.Win.C1FlexGrid.CellRange = CurrentTable.Grid.GetCellRange(e.Row.Index+2,CurrentTable.Cols.Count-1, e.Row.Index+2,CurrentTable.Cols.Count)
    \'
    \'cs1.Border.Color = color.black
    \'cs1.Border.Direction = 1
    \'cs1.border.Width=2
    \'cs2.Border.Color = color.black
    \'cs2.Border.Direction = 1
    \'cs2.border.Width=2
    \'cs1.TextAlign=C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter
    \'cs2.TextAlign=C1.Win.C1FlexGrid.TextAlignEnum.CenterCenter
    \'rng.style = cs1
    \'rng2.style = cs2
End If

--  作者:lur320
--  发布时间:2018/8/20 13:45:00
--  
OK了,稍微改改,放到打开这个table的菜单上面。紧接着分组统计的代码