Kendo UI Grid Localization

Source: Internet
Author: User
Tags html tags min

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>

The JS code is as follows:

 <script> var data = {data: [{id:1, Name: ' Test1 '}, {id:2, Name: ' Test2 '}], total:25} $ (fun
            Ction () {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, MO
                de: "Popup", window: {title: "New"}}, Scrollable:false, Sortable:true, filterAble:true, pageable: {input:true, Numeric:false
                    }, Columns: [{field: "id", Title: "id", format: "{0:c}", Width: "130px"}, {field: ' Name ', title: ' ", ' width: ' 130px '}, {command: [" edit "," destroy "], title:" &nbsp
            ; ", Width:" 200px "}]});
        $ ("#datepicker"). Kendodatepicker ();
    }); </script>

The effect diagram is as follows:



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 of Chinese is finished. pagination, editing, buttons are all good.

Reprint please mark from: http://blog.csdn.net/zhangyuanwei88 Thank you

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.