Add JS Reference
<link href= "Http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css" rel= "stylesheet"/> < Link href= "http://cdn.kendostatic.com/2014.2.716/styles/kendo.default.min.css" rel= "stylesheet"/> < Script src= "Http://cdn.kendostatic.com/2014.2.716/js/jquery.min.js" ></script> <script src= "http ://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js "></script> <script src=" Kendo.culture.zh-cn.min.js "></script> <script src=" Kendo.messages.zh-cn.js "></script>
HTML Tags:
<input id= "DatePicker" value= "10/10/2011" style= "width:150px;"/> <div id= "Example" > <div id= "Grid" ></div> </div>
JS code such as the following:
<script> var data = {data: [{id:1, Name: ' Test1 '}, {id:2, Name: ' Test2 '}], total:25} $ (funct Ion () {kendo.culture ("ZH-CN"); $ ("#grid"). Kendogrid ({dataSource: {data:data, Schema: { Data: ' Data ', total: ' Total ', model: { ID: "id", fields: {ID: "id", Name: "Name"}}, Pagesize:20 }, Editable: {confirmation:true, Mode: "Popup", window: {title: "New"}}, Scrollabl E:false, Sortable:true, Filterable:true, PAGeable: {input:true, numeric:false}, columns: [ {field: "id", Title: "id", format: "{0:c}", Width: "130px"}, {field: "Name", Title: "Name", Width: "130px"}, {command: ["edit", "destroy"], title: " ", Width: "200px"}] }); $ ("#datepicker"). Kendodatepicker (); }); </script>
For example, the following:
Summarize:
1.kendo.culture ("ZH-CN"); is to set the language used by the current kendo
The title of the 2.kendo grid is in the place of the Chinese
Editable: {
Confirmation:true,
Mode: "Popup",
window: {
Title: "New"
}
}
3. Through the above steps a good grid is finished. pagination, editing, button are all good.
Reprint please mark from: http://blog.csdn.net/zhangyuanwei88 Thank you
Kendo UI Grid Localization