为什么全局表事件DrawCell中写入下面代码不起作用?
''帐号每4个数字加空格
For Each cl As Col In e.Table.Cols
If cl.IsString AndAlso e.Col.Name.Contains("开户帐号") Then
e.Text = e.Text.Replace(" ","")
Dim m As Integer = e.Text.Length
For n As Integer = 4 To m + m\4 Step 5
e.Text = e.Text.Insert(n," ")
Next
End If
Next
1、我用的是外部表
2、我在项目事件Initialize已开启DrawCell
''==============开启全局表事件============
For Each dt As DataTable In DataTables '开启表事件
dt.GlobalHandler.PrepareEdit = True
dt.GlobalHandler.BeforeDeleteDataRow = True
dt.GlobalHandler.KeyDown = True
dt.GlobalHandler.DataColChanged = True
dt.GlobalHandler.Click = True
dt.GlobalHandler.DataRowAdding = True
dt.GlobalHandler.DataRowAdded = True
dt.GlobalHandler.DrawCell = True
dt.GlobalHandler.MouseEnterCell = True
dt.GlobalHandler.MouseLeaveCell = True
dt.GlobalHandler.DataRowDeleting = True
Next