Radnumeric filter

4 posts, 0 answers
  1. Venkat
    Venkat avatar
    11 posts
    Member since:
    Feb 2012

    Posted 23 Feb 2012 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Feb 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Venkat
    Venkat avatar
    11 posts
    Member since:
    Feb 2012

    Posted 24 Feb 2012 Link to this post

    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
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Feb 2012 Link to this post

    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.
Back to Top