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

Number textbox inside Grid

1 Answer 158 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vinod
Top achievements
Rank 1
Vinod asked on 04 Oct 2019, 06:20 AM

Hi, 

Please suggest a way to disable the increase/decrease in numbers inside a numeric textbox on the Grid at the column level filter using up/down arrows or up/down scrollbar. 

Regards,

Vinod

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 04 Oct 2019, 07:20 AM

Hello, Vinod,

This will require using a custom filter when the developer will have full access to the filtering:

https://www.telerik.com/kendo-react-ui/components/grid/filtering/#toc-custom-filter-cells

Then in the custom NumericTextBox used for filtering, I can suggest checking the keys that fire the event and do not change the value if it were the arrow keys or scrolling:

    if (
      e.nativeEvent.keyCode === 38 ||
      e.nativeEvent.keyCode === 40 ||
      e.nativeEvent.type === "wheel"
    ) {
      return;
    } else {
    // Set the value
    }

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Vinod
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or