GRID: Get a reference to the grid in which a custom eXcell l

Hi,



I have a custom eXcell which renders a button to add/delete rows in the grid. I am using this custom eXcell in MULTIPLE grids on the same page.



My question: How can I get the ID of the grid into which the custom eXcell is being added, in order to use this information in the custom eXcell’s event-handler?



IE:

My code currently looks something like this…



eXcell_button.prototype.setValue = function(val){

var row_id=’"’+this.cell.parentNode.idd+’"’;

sHTML = “”;

this.setCValue(sHTML,val);

}



I need to reference the name of the grid (or the grid object itself) the eXcell button resides in, so I can pass it as an argument to my “handleAddRow()” function. Something like…



eXcell_button.prototype.setValue = function(val){

var row_id=’"’+this.cell.parentNode.idd+’"’;

var grid_id= [ THE VARIABLE NAME OF THIS GRID / OR A REFERENCE TO THE GRID !!! ] <------------ HOW ???

sHTML = “”;

this.setCValue(sHTML,val);

}



Thanks,

Jon.













If you are using same code for excell as in samples then you can use this.grid - as reference to the grid object;
function eXcell_custom{
if (cell){
this.cell=cell;
this.grid=this.cell.parentNode.grid; //here reference to the grid object stored.

If you have grid object, ID of its container can be taken as
grid.entBox.id