Disable Mouse Scroll of GridNumericColumn in EditMode=Batch, EditType=Cell

5 posts, 0 answers
  1. IT Support
     IT Support avatar
    4 posts
    Member since:
    Apr 2012

    Posted 06 Aug 2014 Link to this post

    How can I stop the mouse scroll wheel incrementing and decrementing the values of a GridNumericColumn in my Radrgrid when EditMode="Batch" and EditType="Cell"?

    This post suggests using ItemDataBound: http://www.telerik.com/forums/gridnumericcolumn-edit-control
    However if I step into the debugger the code:
         if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    is never True

    Hope you can help?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 Aug 2014 in reply to IT Support Link to this post

    Hi Mark,

    You can use the GridNumericColumnEditor to control the cell in edit mode. Please try the following code snippet.

    <telerik:RadGrid ID="RadGrid1" runat="server">
        <MasterTableView  EditMode="Batch">
            <BatchEditingSettings EditType="Cell" />
                <telerik:GridNumericColumn UniqueName="Freight" HeaderText="Freight" DataField="Freight" ColumnEditorID="FreightColumnEditor">
    <telerik:GridNumericColumnEditor ID="FreightColumnEditor" runat="server"
     NumericTextBox-IncrementSettings-InterceptMouseWheel="false" >

  3. Angel Petrov
    Angel Petrov avatar
    1153 posts

    Posted 11 Aug 2014 Link to this post

    Hi Mark,

    Another option for you would be obtain a reference to the RadNumericTextBox rendered as an editor for that column and set the InterceptMouseWheel property to false.

                       <telerik:GridNumericColumn UniqueName="Freight" DataField="Freight"></telerik:GridNumericColumn>

    protected override void OnPreRender(EventArgs e)
            RadNumericTextBox numericEditor = (RadGrid1.MasterTableView.GetBatchColumnEditor("Freight") as GridNumericColumnEditor).NumericTextBox;
            numericEditor.IncrementSettings.InterceptMouseWheel = false;

    Angel Petrov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  4. Jeffrey
    Jeffrey avatar
    6 posts
    Member since:
    Jan 2019

    Posted 09 Jan 2019 in reply to Angel Petrov Link to this post

    I get the message Telerik.Web.UI.GridException: GridTableView.GetBatchColumnEditor method could be used only when EditMode is set to batch.

    Any advise?

  5. Eyup
    Eyup avatar
    4073 posts

    Posted 14 Jan 2019 Link to this post

    Hi Jeffrey,

    Batch editing mode is one of the edit modes provided by RadGrid and it can be enabled using the EditMode property of the MasterTableView tag:

    You can check the following resource to see how you can disable arrow key and scroll navigation in the inner controls when using Batch editing:

    I am also sending a sample RadGrid web site.

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top