Syncfusion GridControl Textbox - Restrict from pasting of the character more than maxlength
Syncfusion GridControl Textbox Celltype
Restrict from pasting of the character more than maxlength
Private Sub GridControl1_CurrentCellValidateString(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs) Handles GridControl1.CurrentCellValidateString
If (e.Text.Length > GridControl1.ColStyles(1).MaxLength) Then
e.Cancel = True
End If
e.Cancel = True
End If
End Sub
Private Sub GridControl1_PasteCellText(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridPasteCellTextEventArgs) Handles GridControl1.PasteCellText
If (e.Text.Length > e.Style.MaxLength) Then
e.Cancel = True
e.Abort = False
End If
e.Cancel = True
e.Abort = False
End If
End Sub
Comments
Post a Comment