BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Ram Sagar Mourya,
Thanks for using Syncfusion
products.please find the response for your query.
how to clear the datasource for Grid |
To clear dataSource in grid . please use below code :
$("#Grid").ejGrid("option", { dataSource: [] });
For your convenience, we have created below sample sample to clear dataSource of grid.
Sample:
|
Please let us know if you have any concerns.
Regards,
Yogesh R
Hi Ram Sagar Mourya ,
Thanks for using syncfusion product. please find the response.
To clear the chart, use the below code
$("#chart").ejChart("option":{datasource:[]});
We have prepared the sample based on the query. please find the sample in the attachment
Regards
Gowrimathi S
Hi Ram Sagar Mourya,
Please find the response.
Filtered data is bound to grid after dataSource is cleared. |
We have provided workaround to avoid the issue “Filtering collection is not cleared after binding new dataSource to grid”. Please find the workaround for this issue. [code] $("#clearData").click(function () { $("#Grid").ejGrid("option", { dataSource: [] }); var instance = $("#Grid").ejGrid("instance"); instance._filterCollection = []; });
Sample:
Also we have considered, this as issue . The fix for this issue will available on our upcoming release .
|
Issue with grid pager while clearing and updating dataSource |
Thanks for your information, we can reproduce issue with provided data. The fix for issue “getGridPager is null“ will be available on our upcoming release. |
Please let us know if you have any further assistance .
Regards,
Yogesh R
Hi Ram Sagar Mourya,
Thanks for using Syncfusion products.please find the response for your query.
how to clear the datasource for Grid
To clear dataSource in grid . please use below code :
$("#Grid").ejGrid("option", { dataSource: [] });
For your convenience, we have created below sample sample to clear dataSource of grid.
Sample:
Please let us know if you have any concerns.
Regards,
Yogesh R
function updateDataSource(){
$("#TreeGridContainer").ejTreeGrid("option","dataSource",[]);
} |