Membuat Validasi Angka dan UPPER CASE di GRID vb.net

‘event   Grid_ShownEditor

Dim view As GridView = CType(sender, GridView)
If Not (TypeOf (view.ActiveEditor) Is CheckEdit) Then
Dim edit As TextEdit = CType(view.ActiveEditor, TextEdit)
‘UPPER CASE
If Not (edit Is Nothing) Then
edit.Properties.CharacterCasing = CharacterCasing.Upper

End If

‘Number Validation
If view.FocusedColumn.FieldName = “SIZE” Then
edit.Properties.Mask.MaskType = Mask.MaskType.RegEx
edit.Properties.Mask.EditMask = “[0-9″”]*”
End If

End If

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s