Foxtable(狐表)用户栏目专家坐堂 → 特定行的网格线?


  共有1901人关注过本帖树形打印复制链接

主题:特定行的网格线?

帅哥哟,离线,有人找我吗?
lur320
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:983 积分:8628 威望:0 精华:0 注册:2015/8/12 16:28:00
特定行的网格线?  发帖心情 Post By: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



 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:983 积分:8628 威望:0 精华:0 注册:2015/8/12 16:28:00
  发帖心情 Post By: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
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:983 积分:8628 威望:0 精华:0 注册:2015/8/12 16:28:00
  发帖心情 Post By:2018/8/20 13:45:00 [只看该作者]

OK了,稍微改改,放到打开这个table的菜单上面。紧接着分组统计的代码

 回到顶部