Foxtable(狐表)用户栏目专家坐堂 → [分享]做了个列 显示关联行数的例子


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

主题:[分享]做了个列 显示关联行数的例子

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


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/8/17 9:16:00 [显示全部帖子]

代码改一下

 

If e.Col.Name = "第一列" Then
    e.StartDraw()
    Dim fnt As New Font("微软雅黑",10,FontStyle.Bold)
    If e.Row.DataRow.GetChildRows("表B").Count > 0 Then
        Dim msg As String = CStr(e.Row.DataRow.GetChildRows("表B").Count)
        Dim c As Integer
        If e.Col.Width = -1 Then
            c = 100
        Else
            c = e.Col.Width
        End If
        e.Graphics.FillEllipse(Brushes.red,e.x + c - 25 ,e.y+0,18,18)
        ' e.Graphics.FillEllipse(Brushes.red,e.x + 0 ,e.y + 0,18,18)
        e.Graphics.DrawString(msg,fnt,Brushes.White,e.x + c - 22 ,e.y + 0)
    End If
    e.EndDraw()
End If


 回到顶部