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>

  • 相关阅读:
    SQL注入
    浅复制
    重构
    UML
    UML
    工业4.0
    MVC
    博客搬家(CSDN->博客园)
    BitCoin
    Java
  • 原文地址:https://www.cnblogs.com/jiangcm/p/7456548.html
Copyright © 2011-2022 走看看