Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 接收错误数据后清空剑道UI中的网格_Javascript_Ajax_Kendo Ui - Fatal编程技术网

Javascript 接收错误数据后清空剑道UI中的网格

Javascript 接收错误数据后清空剑道UI中的网格,javascript,ajax,kendo-ui,Javascript,Ajax,Kendo Ui,当您通过数据源传递新数据时,我正在处理的kendoUI网格将被刷新,这很好,但当发生错误或操作时,我需要清空它 那么,如何手动清空和刷新kendoUI网格呢 提前感谢您能试试这个吗: $("#yourGridId").empty(); // Empty the grid. $("#yourGridId").data('kendoGrid').refresh(); // Refrsh the grid. 希望这能解决您的问题。您能试试这个吗: $("#yourGridId").empty();

当您通过数据源传递新数据时,我正在处理的kendoUI网格将被刷新,这很好,但当发生错误或操作时,我需要清空它

那么,如何手动清空和刷新kendoUI网格呢


提前感谢

您能试试这个吗:

$("#yourGridId").empty(); // Empty the grid.
$("#yourGridId").data('kendoGrid').refresh(); // Refrsh the grid.

希望这能解决您的问题。

您能试试这个吗:

$("#yourGridId").empty(); // Empty the grid.
$("#yourGridId").data('kendoGrid').refresh(); // Refrsh the grid.

希望这能解决您的问题。

非常感谢,我已经尝试过刷新(),但没有尝试过空的()。非常感谢,我已经尝试过刷新(),但没有尝试过空的()。非常感谢,我已经尝试过刷新(),但没有尝试过空的()。