function BindDataToGrid(Data) {
var dataSource = new kendo.data.DataSource({
pageSize: 30,
data: Data,
autoSync:
true,
schema: {
model: {
id:
"ModuleID",
fields: {
ModuleID: { editable:
false, nullable: true },
Name: { editable:
false, nullable: true },
View: { editable:
false, nullable: true },
Add: { editable:
false, nullable: true },
Delete: { editable:
false, nullable: true },
IsDefault: { editable:
false, nullable: true }
}
}
}
});
$(
"#roleAccessGrid").kendoGrid({
dataSource: dataSource,
pageable:
true,
height: 260,
columns: [
{ field:
"Name", width: 120, title: "Module Name " },
//{ field: "ProductName", title: "Product Name" },
{field:
"View", width: 50, title: "View", template: '<input type="checkbox" # if(View==true){ # checked #} #></input>' },
{
field:
"Add",
width: 50,
title:
"Add",
template:
"<input type='checkbox' id='chkAdd' # if(Add==1){ # checked=checked #} # />"
},
{
field:
"Edit",
width: 50,
title:
"Edit",
template:
"<input type='checkbox' id='chkEdit' # if(Edit==1){ # checked #} # />"
},
{
field:
"Delete",
width: 50,
title:
"Delete",
template:
"<input type='checkbox' id='chkDelete' # if(Delete==1){ # checked #} # />"
},
{
field:
"IsDefault",
width: 50,
title:
"IsDefault",
template:
"<input type='checkbox' id='chkIsDefault' # if(IsDefault==1){ # checked #} # />"
}
],
editable:true 
});
My problem is that I am unable to retrieve the value after making a change on the check box.
Thanks in advance
<!DOCTYPE html><html><head><meta name="description" content="[chart]" /><script src="http://code.jquery.com/jquery-1.8.2.min.js"></script><script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js"></script></head><body> <div id="chart"></div> <script> $(function() { var data = [ { "Date": "12/31/2007", "IndexValue": 190.68435691915832, }, { "Date": "1/1/2008", "IndexValue": 190.67087650872867, }, { "Date": "1/2/2008", "IndexValue": 190.67087650872867, }, { "Date": "1/3/2008", "IndexValue": 190.67087650872867, } ]; $("#chart").kendoChart({ theme: $(document).data("kendoSkin") || "default", title: { text: "Charge current vs. charge time" }, legend: { visible: true }, seriesDefaults: { type: "line" }, series: [{ name: "Date", field: "Date" }], valueAxis: { field: "IndexValue" }, tooltip: { visible: true, format: "{1}% in {0} minutes" } }); }); </script></body></html>This is my first time using Kendo UI and I'm trying to set up a simple grid with data fed from a json file.
When the page loads, it doesn't display anything and it does not give me any type of error, am i doing anything wrong?
var Data = new kendo.data.DataSource({
transport: {
read: {
url: "http://localhost:88/Animation.svc/GetProspect",
dataType: "json"
}
},
});
$("#grid").kendoGrid({
dataSource: Data,
columns: [
{
field: "Date",
title: "Date"
},
{
field: "Name",
title: "Name"
}],
height: 200,
scrollable: true,
pageable: true,
sortable: {
mode: "multiple"
}
});
This is what the json format looks like:
[{"Date":"12-31-2010","Name":"A","LastName":"B"}, {"Date":"12-31-2011","Name":"B","LastName":"C"}]