Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3760
Set MaxLength of input cells in webdatagrid
posted

I am trying to limit the length of text entry fields in a simple webdatagrid. I have tried using a texteditorprovider.

        nameEditor = New TextEditorProvider()
        nameEditor.EditorControl.ID = "Name"
        nameEditor.EditorControl.MaxLength = 10
            Dim editColumn2 As EditingColumnSetting
            editColumn2 = New EditingColumnSetting()
            editColumn2.ColumnKey = "NatureofRisk"
            editColumn2.EditorID = "Name"
            wdgTable.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(editColumn2)

This works but the textbox is not lined up with the column the TextEditorProvider relates to so there is no sense of editing the grid.

Also when clicking off the editor it seems to move to the top of the grid.

When applying this to the RowAdding behaviour the cell being edited appears below the add row.

Is there a way to implement this feature? It's a very obvious thing to do to limit the input text to match the databae column sizes.

Thanks in advance,

Andy

Parents Reply Children
No Data