I have a numeric input cell in a grid which should accept only integer.
Is it possible to restrict user from entering decimal values?
1 Answer, 1 is accepted
0
Konstantin Dikov
Telerik team
answered on 02 Dec 2022, 08:02 AM
Hi Soumita,
Тhank you for contacting us.
There are two ways for achieving the desired result.
The first one would be to define custom editor for the column in question and use a NumericTextBox with format "n0", which will restrict the value to have no decimals:
<NumericTextBoxwidth={200}format="n0" />
And here is a help topic for defining custom editor:
The second approach is more suitable if you want to restrict the decimals for all NumericTextBox components inside the Grid.
Hope this helps.
Regards,
Konstantin Dikov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.