Data grid and javascript

评论

1 条评论

  • Avatar
    Tobias

    Hi N

    Yes, there is. The control data grid is from Kendo UI (kendoGrid). Therefore, you can use the out of the box functionality of Kendo.

    Documentation: jQuery Grid Documentation | Configuration, Methods, Events - Kendo UI for jQuery (telerik.com)

     

    Here is a sample for your case. Not sure if the best way but had not enough time for a full test:

    I've created a data grid called "DataGrid" with two fields "Title and "Created" and with a push of a button this function get called:

    function addRow() {
        let newRow = { Title: "Hello World", Created: new Date() };
        var grid = $("#DataGrid").data("kendoGrid");
        grid.dataSource.insert(newRow)
    }
     
     
    Hope it helps,
    Tobias
    0
    评论操作 固定链接

请先登录再写评论。