Datagrid inline edit on int SQL Server fields

Morning,

I'm not sure if this is intended or or not but, I've noticed what seems a slightly odd behaviour when inline editting a record again an INT database field on a SQL Server database. If I enter integer values (e.g. 1,120,1000) all works as expected. If I enter a decimal value (e.g 1.5, 10.2 etc) when saved, a null value is stored in the database field. Is this what you would expect? I was expecting either a rounded or floored version of the entered decimal to be stored rather than null?

I'm using Radzen 2.62.4.

Hi @markb,

In my opinion this is what will happen if the data type is not the expected/declared type. Maybe you can use Numeric component with int type to prevent this.

Hi @enchev,

I actually have a numeric component on the EditTemplate for the fields in question. What I have noticed is that if I enter a value with a decimal place and then move focus away from the Numeric component, the value is blanked out but, if I go back to the Numeric component and re-enter a value with a decimal place and then move the focus away again, the value is not blanked out. It's as if the Numeric component is only picking up the invalid value once and then doesn't check after that? Steps to reproduce:

  • Open inline edit on a grid with a numeric component on a int field;
  • Set the value to 10.2 and tab / click off of the numeric component - the value in the Numeric component is cleared.
  • Go back to Numeric component and again set the value to 10.2 and tab / click off of the numeric component - the value in the Numeric component is not cleared now.

Thanks for the report @markb! I was able to reproduce the problem and we will do our best to provide fix before the end of this week!