zoukankan      html  css  js  c++  java
  • KendoUi学习之旅 Grid的使用

    <!DOCTYPE html>
    <html>
    <head>

    </head>
    <body>
    <div id="example">
    <div class="demo-section k-content wide">
    <div>
    <div data-role="grid"
    data-auto-bind="true"
    data-editable="true"
    data-toolbar="['create', 'save']"
    data-columns="[
    { 'field': 'ID', 'width': 270 },
    { 'field': 'Price' },
    ]"
    data-bind="source: products,
    visible: isVisible,
    events: {
    save: onSave
    }"
    style="height: 200px"></div>
    </div>
    </div>
    <script>
    var viewModel = kendo.observable({
    isVisible: true,
    products: new kendo.data.DataSource({
    schema: {
    model: {
    id: "ID",
    fields: {
    ID: { type: "number" },
    Price: { type: "string" }
    }
    }
    },
    batch: true,
    transport: {
    read: {
    url: '/Home/GetCategoryList',
    dataType: "json"
    },

    }
    })
    });
    kendo.bind($("#example"), viewModel);
    </script>
    </div>
    </body>
    </html>

  • 相关阅读:
    《入门经典》——6.25
    《入门经典》——6.24
    hdu4417
    poj2104(划分树模板)
    D. 实验室传染病
    poj2069
    poj1379
    hdu5950
    poj3417
    LCA——求解最近公共祖先
  • 原文地址:https://www.cnblogs.com/jiangcm/p/7456548.html
Copyright © 2011-2022 走看看