Numeric input cell in Grid in decimal format when trailing digits are zeros should be supported

1 Answer 167 Views
Grid Input
Naraparaju
Top achievements
Rank 1
Naraparaju asked on 06 Sep 2022, 08:39 PM | edited on 06 Sep 2022, 08:41 PM

Hi,

When we are trying to enter decimal values all as zeros in the numeric input cell of grid, with scale 10 and precision 18 ,
i.e., if in the numeric column enter "5.00" in one row, "5.500" in another row.
Upon Save or Reload (some postback), the trailing zeros are removed, which shouldn't. and the values are shown as 5 , 5.5 respectively, instead of 5.00 and 5.500

Could you suggest any way to achieve this, or is there an example on this grid numeric cell, as this is working in textbox outside the grid.

Thanks,

Seetha

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 08 Sep 2022, 01:44 PM

Hi Seetha,

If the field is numeric type, the default editor will be a NumericTextBox which works with numbers and not strings. This means that the value passed to the update method will be a numeric value, which does not have trailing zeroes. If you want to keep the zeroes you will have to change the type to be string instead and work with standard Input component. 

If you have something different in mind and if I misunderstood the scenario, do not hesitate to get back to us. 

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid Input
Asked by
Naraparaju
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or