How to use SetDataSource Method of the Kendo UI Grid

后端 未结 2 1048
萌比男神i
萌比男神i 2021-01-02 08:35

Has anyone been able to use setdatasource method of the kendo UI grid? I believe this is used to assign datasource that can be assigned to the grid at the later stage and al

2条回答
  •  灰色年华
    2021-01-02 09:07

    If you want to set the setDataSource other way is creating a dataSource from the object returned by your ajax request as is explain in the following LINK by Brett

     var dataSource = new kendo.data.DataSource({
      data: "your object returned by ajax"
    });
    
    $('#GridKatildigiKurslar').data('kendoGrid').setDataSource(dataSource);
    

    Off Course the grid should be configured to show the returned object.

提交回复
热议问题