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

Radnumeric filter

3 Answers 74 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Venkat
Top achievements
Rank 1
Venkat asked on 24 Feb 2012, 04:56 AM
Hi there,

Im using radgrid with numeric column and radnumbericTextbox as a filter control.  i want to disable keyboard/mousewheel increment settings from code behind. is this possible ?

thanks,
Venkat

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Feb 2012, 06:49 AM
Hello Venkat,

Try the following code.
C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
 if (e.Item is GridFilteringItem)
 {
   GridFilteringItem itm = (GridFilteringItem)e.Item;
   RadNumericTextBox txt = (RadNumericTextBox)itm["UniqueName"].Controls[0];
   txt.IncrementSettings.InterceptArrowKeys = false;
   txt.IncrementSettings.InterceptMouseWheel = false;
 }
}

-Shinu.
0
Venkat
Top achievements
Rank 1
answered on 24 Feb 2012, 09:36 AM
Hello Shinu,
 
Thanks for you reply. your code is working great. i have more number of this type of numeric filters. Is there any way to make this code as common and to make use all numerictype filter. thanks in advance

-Venkat
0
Shinu
Top achievements
Rank 2
answered on 27 Feb 2012, 06:25 AM
Hello Venkat,

It is not possible to write a common code for numeric columns if the grid contains columns other than numeric columns. If the grid contains only NumericColumns, you can loop through each columns using foreach  in PreRender using its UniqueName.

-Shinu.
Tags
Filter
Asked by
Venkat
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Venkat
Top achievements
Rank 1
Share this question
or