jQuery UI Widgets › Forums › Grid › Cell empty value
Tagged: default, default value, grid, jqx grid, validation
This topic contains 6 replies, has 2 voices, and was last updated by Hristo 10 years, 6 months ago.
-
AuthorCell empty value Posts
-
Hi!
I have a problem with empty values.
When go to edit mode in an empty cell, then the default value is assigned to 0, thus I can’t clear the value, and when you exit edit mode, the value remains 0. It’s not right. If no value is entered it must be empty.
columns:
{“pos”:1, datafield”:”235″, “text”:”ВремяРоспумин”, “columntype”:”numberinput”, “cellsformat”:”f0″, “align”:”center”, “cellsalign”:”center”, “aggregates”:[‘max’, ‘avg’, ‘min’], “nullable”:true,
createeditor: function (row, column, editor) {
editor.jqxNumberInput({spinMode: ‘simple’, spinButtons: false, spinButtonsStep: 0, inputMode: ‘simple’, value: column, decimalSeparator: “,” , groupSeparator: ” “, textAlign: “center”});
}, …
},Maybe I something don’t understand, please help.
Thank you!
Hello Alex,
Please take a look this example:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/editrowsrendering.htm?arctic
Focus on ‘Price’ if you write some different value from interval [0 – 15] there will apear warning message.
If you want could provide an example in jseditor/fiddle for better analize.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comYou didn’t understand me. Remove from jqxNumberInput default value = 0.
Best solution make for input field property “defaultValue”.
Hello Alex,
Sorry for that misunderstood.
Please take a look one workaround: http://jsfiddle.net/2atq064n/
I hope this can help.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo!
Thanks for the help. Well, now we have to decide how to clear the field from value, because 0 is a value.
Hello Alex,
Thanks for using our product. We can provide you such workaround.
When ‘cellvalue’ is null then a concrete cell is empty.
You could try some own logic in grid with input (with “type = number”).Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.