This is a migrated thread and some comments may be shown as answers.

GridNumericColumn edit control

2 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christopher Borys
Top achievements
Rank 1
Christopher Borys asked on 23 Mar 2010, 11:45 PM
I am using quite often GridNumericColumn and in some cases I would like to disable mouse wheel scrolling feature.
When in edit mode, the mouse wheel increases or decreases the content number.  I want to disable that feature.  I want users explicitly enter the number through the keyboard only.  Can someone help me how?

Thanks,
Chris

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Mar 2010, 07:14 AM

Hello Chris,

Try adding the folowing code snippet in order to set the RadNumericTextBox property, when the row in EditMode.

C#:

 
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)  
    {  
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {  
            GridEditFormItem editItem = (GridEditFormItem)e.Item;  
            RadNumericTextBox textBox = (RadNumericTextBox)editItem["ColumnUniqueName"].Controls[0];  
            textBox.IncrementSettings.InterceptMouseWheel = false;  
        }  
    } 

-Shinu.

0
Christopher Borys
Top achievements
Rank 1
answered on 24 Mar 2010, 06:10 PM
Thank you.
Chris
Tags
Grid
Asked by
Christopher Borys
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Christopher Borys
Top achievements
Rank 1
Share this question
or