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
    評論操作 永久連結

登入寫評論。