I can not delete the value 0 in the datatable editor
I can not delete the value 0 in the datatable editor
gunseli
Posts: 14Questions: 8Answers: 0
Hi,
I am using datatable editor. My area in the picture is a decimal column. For example, it allows me to leave it blank when I enter the value 5 and then delete it. However, when I delete it after entering the value 0, the value 0 remains.
This discussion has been closed.
Answers
What is your database (e.g. MySQL, Postgres, something else)? I've just tried to reproduce what you are seeing in this example where the age column is defined with the same set formatter that you have:
And it appears to work as expected when setting the value to be an empty string.
Might you have set the
type
attribute for the input to benumber
? I'm wondering if the client-side is submitting the0
. Can you link to your page so I can get the full picture please?Thanks,
Allan
I am using MS SQL. This field in SQL is decimal. The problem is solved if I make this field a string.
When I delete the value 0, it writes back 0 without even going into preSubmit
Thanks for letting me know. I'll try this on Monday locally and see what is going on.
Regards,
Allan
Hi,
I've just tried it locally and it appears to accept empty value okay:
What version of the Editor .NET libraries are you using please?
Allan