MaxLength Property not working for GridNumericColumn

Thread is closed for posting
2 posts, 1 answers
  1. Manny
    Manny avatar
    2 posts
    Member since:
    Apr 2017

    Posted 27 Jul 2017 Link to this post


    I'm creating a grid programmatically and I want to set the MaxLength of a GridNumericColumn but it's not working. MinValue and MaxValue works, but not MaxLength. Please help.



  2. Answer
    Eyup avatar
    3759 posts

    Posted 01 Aug 2017 Link to this post

    Hello Manny,

    Generally, this property should work as expected, the only exception being Batch editing, which is a tad different. You can access the generated numbox using the approach demonstrated here:

    In this case it will be something like this:
    Copy Code
    protected void RadGrid1_PreRender(object sender, EventArgs e)
        GridTableView masterTable = ((RadGrid)sender).MasterTableView;
        GridNumericColumnEditor editor = masterTable.GetBatchColumnEditor("Freight") as GridNumericColumnEditor;
        RadNumericTextBox numBox = editor.NumericTextBox;
        numBox.IncrementSettings.InterceptArrowKeys = false;
        numBox.IncrementSettings.InterceptMouseWheel = false;

    An alternative approach is the following:
    <telerik:GridNumericColumn ... ColumnEditorID="NumBoxEditor1">

    Editor definition on the same page with the RadGrid:
    <telerik:GridNumericColumnEditor runat="server" ID="NumBoxEditor1">
        <NumericTextBox runat="server">
            <IncrementSettings InterceptArrowKeys="false" InterceptMouseWheel="false" />

    Instead of Intercept properties, just set the MaxLength and this should do the trick.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top