Everything on my grid is working great except when they click update and then cancel they get an error. "Unexpected number"
Here is the code. the functions applist, companylist, etc just populate the edit dropdowns. They seem to be generaign find though. Any ideas?
Here is the code. the functions applist, companylist, etc just populate the edit dropdowns. They seem to be generaign find though. Any ideas?
var
crudServiceBaseUrl =
"main.php?a=quote_detail"
, dataSource =
new
kendo.data.DataSource({
transport : {
read : {
url : crudServiceBaseUrl +
"&read=1"
,
dataType :
"json"
},
update : {
url : crudServiceBaseUrl +
"&update=1"
,
dataType :
"json"
,
complete:
function
(e) {
$(
"#grid"
).data(
"kendoGrid"
).dataSource.read();
}
},
destroy : {
url : crudServiceBaseUrl +
"&destroy=1"
,
dataType :
"json"
},
create : {
url : crudServiceBaseUrl +
"&create=1"
,
dataType :
"json"
,
complete:
function
(e) {
$(
"#grid"
).data(
"kendoGrid"
).dataSource.read();
}
}
},
batch :
true
,
pageSize : 10,
serverPaging :
true
,
serverFiltering :
true
,
serverSorting :
true
,
schema : {
data:
"data"
,
total:
"total"
,
model : {
id :
"ID"
,
fields : {
company : {
validation : {
required :
true
}
},
effective_date : {
validation : {
required :
true
}
},
fee : {
validation : {
required :
true
}
},
guarantee : {
validation : {
required :
true
}
},
state : {
validation : {
required :
true
}
},
application : {
}
}
}
}
});
$(
"#grid"
).kendoGrid({
dataSource : dataSource,
pageable :
true
,
height : 430,
refresh:
true
,
toolbar : [
"create"
],
columns : [{
field :
"company"
,
title :
"Company"
,
editor: companyList
}, {
field :
"effective_date"
,
title :
"Effective Date"
}, {
field :
"fee"
,
title :
"Fee"
}, {
field :
"guarantee"
,
title :
"Guarantee"
}, {
field :
"state"
,
title :
"State"
,
editor: stateList
},
{
field :
"application"
,
title :
"Application"
,
editor: appList
},
{
command : [
"edit"
,
"destroy"
],
title :
" "
,
width :
"160px"
}],
editable :
"inline"
});