1
에 웹 서비스 바인딩되지 않은 : 여기원격 데이터는 다음 코드를 감안할 때 그리드
<script type="text/javascript">
$(document).ready(function() {
dataSource = new kendo.data.DataSource({
transport: {
read: {
//url:crudurl+"/GetData",
url: "GridWebService.asmx/GetData",
dataType: "json"
}
},
batch: true,
pageSize: 4,
schema: {
model: {
id: "eid",
fields: {
eid: { editable: false, nullable: true },
ename: { validation: { required: true} },
age: { type: "number", validation: { required: true, min: 1} },
salary: { type: "number", validation: { required: true, min: 1} }
}
}
}
});
$("#grdCRUD").kendoGrid({
dataSource: dataSource,
pageSize: 4,
pageable: {
refresh: true,
pageSizes: true
},
height: 400,
toolbar: ["create"],
columns: [
{ field: "ename", title: "EmployeeName", width: "150px" },
{ field: "age", title: "EmployeeAge", width: "150px" },
{ field: "salary", title: "EmployeeSalary", width: "100px" },
{ command: ["edit", "destroy"], title: " ", width: "210px" }
],
editable: "inline"
});
});
</script>
내가 웹 서비스를 통해 Grid
를 검도하는 데이터베이스에서 데이터를 바인딩 코드 라인 위에 작성했습니다. 그러나 Data
은 Grid
에 바인딩되지 않습니다. DataSource
에 실수가 있습니까? Ajax 바인딩을 사용하고 있지 않은지 확인하십시오.