-- 作者:everybody
-- 发布时间:2015/8/17 0:21: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) e.Graphics.FillEllipse(Brushes.red,e.Col.Width ,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.Col.Width + 3 ,e.y + 0) End If e.EndDraw() End If
|
-- 作者:大红袍
-- 发布时间: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
|