I have tabstrip
with two tab. On each tab i have one grid with paging.
My configuration for grid is on the client side. When I fast switch beetween tab then I get exception from javascript:
"throw Error(kendo.format("Cannot call method '{0}' of {1} before it is initialized",t,r))"
Below section for paging configuration in grid:
[...]
pageable: {
pageSizes: [5, 10, 20],
input: true
},
[...]
Have you any idea how prevent this error?
I faced the same issue, and yes there is a fix for it, basically you just need to destroy the grid before you move to new tab...
The best way to tackle this is by using this function while will look for kendo grid and destroy them
$("[kendo-grid]").each(function(idx,kGrid){
var dataObj=$(kGrid).data();
for(mData in dataObj)
{
if(typeOf dataObj[mData] != "string")
{
if("destroy" in dataObj[mData])
{
dataObj[mData].destroy();
}
}
}
})
Hope this helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With