hi,
In my application, I’m creating runtime tabs and loading grids with following function, where each grid keeps data from different queries at the time of creation. I want to export each grid into excel, by clicking export button in tool bar attached to each tab. with below coding I’m getting " ‘mygrid’ is undefined" error for the line within the toolbar function, how to resolve this,
regards,
suminda,
note:var ncat={}; //namespace
*******tool bar function
ncat.tab_toolbar_click=function(id){
switch(id){
case “export”:
mygrid.toExcel(“./grid-html-php/generate.php”);
break;
}
};
Hi,
mygrid in your case is not a global variable, so it doesn’t link to grid instance. You should use variable which references to grid instance instead of mygrid.