找了个折中的的办法,就是把输入的全角字符自动转成半角,具体如下:
Private Sub StaffInfoT_CellValueChanged(sender As Object, e As GrapeCity.Win.MultiRow.CellEventArgs) Handles StaffInfoT.CellValueChanged
CellNo = StaffInfoT.CurrentCell.Name.ToString
End Sub
Private Sub StaffInfoT_CurrentCellChanged(sender As Object, e As System.EventArgs) Handles StaffInfoT.CurrentCellChanged
Try
StaffInfoT.Rows(0).Cells(CellNo).Value = StrConv(StaffInfoT.Rows(0).Cells(CellNo).Value, VbStrConv.Narrow)
Catch ex As Exception
'MsgBox(ex.Message)
End Try
End Sub
还要在离开此画面时把收入法换成半角,不然在其他地方还需要手动切换。 |