我设计了一个按钮
按钮事件代码:
dim _intFileSelAll as integer=1
_intFileSelAll = 0
c1flexgrid.DrawMode = DrawModeEnum.OwnerDraw
Private Sub c1flexgrid_OwnerDrawCell(sender As Object, e As C1.Win.C1FlexGrid.OwnerDrawCellEventArgs) Handles FG_STORE.OwnerDrawCell
FG_STORE(e.Row, 0) = e.Row
If e.Row >= 1 Then
If _intStoreSelAll = 1 Then
c1flexgrid(e.Row, "xz") = 1
Else
c1flexgrid(e.Row, "xz") = 0
End If
End If
End Sub
列项名是xz的一列是复选框,未通过按钮来切换_intFileSelAll值,来更改xz所在列项复选框打勾还是取消打勾。我有些时候发现会迟疑。但实际里面的数据就2,3个记录
所以我想知道什么情况下会触发OwnerDrawCell。
还是说 c1flexgrid.DrawMode = DrawModeEnum.OwnerDraw,设置成这样,主要表格有更改,或者刷新就会触发?
|
|