Can anyone help me with a problem I am having. I'm using JEasyUI eDataGrid, and when inserting a new record I would like the numberbox fields to automatically have a 0 in them.
Table portion
<th field="Defect" width="50">Defect</th>
Script
$(function(){
$('#dg').edatagrid({
url: ...
emptyMsg: 'No Record(s) Found',
columns:[[
{field:'Defect',title:'Defect',width:100,
formatter:function(value,row){
return row.Defect|| value;
},
editor:{
type:'numberbox',
options:{
required:true,
min:0,
*value: 0,*
}
Looking through the documentation, adding a value property should set a default value but it does not.
Figured out the answer. What I needed to do was add the following to my script.