Disable and enable grid
When you disable the grid using given code, it works. But if you click on the disabled grid it creates an error. So you need to try, catch that error.
Error comes from following function of grid.js
var dispatch=function(event,element){
var parts=element.id.split("/");
var tag=parts[0].split(".");
var obj=Active.System.all[tag[0]];
var type="_on"+event.type+"Event";
var i;
for(i=1;i<tag.length;i++){
var params=tag.split(":");
obj=obj.getTemplate.apply(obj,params)
}
var target=obj;
for(i=1;i<parts.length;i++){
target=target.getContent(parts[i])
}
if(window.HTMLElement){
window.event=event
}
/* ======= error ======== */
try{
target[type].call(obj,event);
}
catch(error){}
/* ======= error ========= */
if(window.HTMLElement){
window.event=null;
}
return;
};
Error comes from following function of grid.js
var dispatch=function(event,element){
var parts=element.id.split("/");
var tag=parts[0].split(".");
var obj=Active.System.all[tag[0]];
var type="_on"+event.type+"Event";
var i;
for(i=1;i<tag.length;i++){
var params=tag.split(":");
obj=obj.getTemplate.apply(obj,params)
}
var target=obj;
for(i=1;i<parts.length;i++){
target=target.getContent(parts[i])
}
if(window.HTMLElement){
window.event=event
}
/* ======= error ======== */
try{
target[type].call(obj,event);
}
catch(error){}
/* ======= error ========= */
if(window.HTMLElement){
window.event=null;
}
return;
};
Chandika Gunawardhana
July 26,