3.2.0

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;
};
Chandika Gunawardhana
July 26,
I am not sure what you are trying to do, but just from the title of your post... I am doing it like this:

obj.setAttribute("enabled","true")

obj.setAttribute("disabled","true") ( grays out the grid )
Adi
July 30,

This topic is archived.

See also:


Back to support forum