Add Record Bug
Can only add the first column. The 2nd and 3rd are available from edit, but not add.
by randyallen
HTML
<script src="http://cdn.kendostatic.com/2012.1.229/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.default.min.css">
<div id="myGrid">
</div>
JavaScript
var myData = [
{
id: 1,
name: "Fred Smith",
city: "Los Angeles",
state: "CA"
},{
id: 2,
name: "John Doe",
city: "New York",
state: "NY"
},{
id: 3,
name: "Joe Bob",
city: "Tulsa",
state: "OK"
}
];
$(document).ready(function () {
viewModel = kendo.observable({
app: myData
});
$("#myGrid").kendoGrid({
height: 344,
sortable: true,
pageable: true,
filterable: false,
navigatable: true,
editable: {
editable: true,
update: true,
create: true,
confirmation: "Are you sure you want to remove this item?"
},
columns: [
{
field: "name",
title: "Name"
}, {
field: "city",
title: "City",
width: 250
}, {
field: "state",
title: "State",
width: 50
}, {
"command": ["destroy", "edit"]
}
],
dataSource: {
data: viewModel.app,
pageSize: 7,
schema: {
model: {
id: "id",
fields: {
...