javascript - Replace content of Kendo ObservableArray without event firing -
i have kendoui grid info in observablearray.
var akendoobservablearray = new kendo.data.observablearray([ .....]); // defining grid .... datasource: { data: akendoobservablearray, pagesize: 10, schema: { model: { id: "_jobinstanceid" // identifier of model } } },
i want replace content of array have gotten new info server. have tried splicing array clear , add together new content 1 one. causes huge performance drop since kendo seek determine on every add-on how paginate grid. there way can replace content of kendo ui observablearray alter event firing once?
the kendoui forum has reply question. need clean array (one remove event fired) , force elements @ 1 time (one add together event fired)
http://www.telerik.com/forums/passing-array-to-observablearray-push
thus, need be
// clean array akendoobservablearray.splice(0, akendoobservablearray.length); akendoobservablearray.push.apply(akendoobservablearray, [{...},{...},{...},{...},{...}];
javascript kendo-ui kendo-grid
No comments:
Post a Comment