
IT Support
Top achievements
Rank 1
IT Support
asked on 06 Aug 2014, 04:09 PM
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?
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?
4 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 07 Aug 2014, 04:24 AM
Hi Mark,
You can use the GridNumericColumnEditor to control the cell in edit mode. Please try the following code snippet.
ASPX:
Thanks,
Princy
You can use the GridNumericColumnEditor to control the cell in edit mode. Please try the following code snippet.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
>
<
MasterTableView
EditMode
=
"Batch"
>
<
BatchEditingSettings
EditType
=
"Cell"
/>
<
Columns
>
<
telerik:GridNumericColumn
UniqueName
=
"Freight"
HeaderText
=
"Freight"
DataField
=
"Freight"
ColumnEditorID
=
"FreightColumnEditor"
>
</
telerik:GridNumericColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:GridNumericColumnEditor
ID
=
"FreightColumnEditor"
runat
=
"server"
NumericTextBox-IncrementSettings-InterceptMouseWheel
=
"
false
"
>
</
telerik:GridNumericColumnEditor
>
Thanks,
Princy
0
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.
ASPX:
C#:
Regards,
Angel Petrov
Telerik
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.
ASPX:
<
Columns
>
<
telerik:GridNumericColumn
UniqueName
=
"Freight"
DataField
=
"Freight"
></
telerik:GridNumericColumn
>
</
Columns
>
C#:
protected
override
void
OnPreRender(EventArgs e)
{
base
.OnPreRender(e);
RadNumericTextBox numericEditor = (RadGrid1.MasterTableView.GetBatchColumnEditor(
"Freight"
)
as
GridNumericColumnEditor).NumericTextBox;
numericEditor.IncrementSettings.InterceptMouseWheel =
false
;
}
Regards,
Angel Petrov
Telerik
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.
0

Jeffrey
Top achievements
Rank 1
answered on 09 Jan 2019, 10:17 PM
I get the message Telerik.Web.UI.GridException: GridTableView.GetBatchColumnEditor method could be used only when EditMode is set to batch.
Any advise?
0
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:
https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx
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:
https://www.telerik.com/support/kb/aspnet-ajax/grid/details/prevent-numeric-value-changing-with-batch-editing-when-using-keyboard-navigation-with-the-arrow-keys
I am also sending a sample RadGrid web site.
Regards,
Eyup
Progress Telerik
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:
https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx
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:
https://www.telerik.com/support/kb/aspnet-ajax/grid/details/prevent-numeric-value-changing-with-batch-editing-when-using-keyboard-navigation-with-the-arrow-keys
I am also sending a sample RadGrid web site.
Regards,
Eyup
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.