DhtmlXGrid(Check boxes dont work properly)

Hi,
I am loading a grid from an xml file. I am attaching an "onEditCell " event to the grid. Due to which my check boxes become readonly. It’s state doesn’t change .If i remove the "On edit cell event " then it works fine.

Kindly Advice as soon as possible

Be sure that onEditCell handler ends with

return true;

Thanks…It worked fine

But, I have 2 grids on “rowselect” event of grid1 my grid2 is loaded and I am attaching my “onEditcell” event in Grid2 on row select of Grid1. So once i select a row in grid1 “edit cell” is called once .But again if i select another row then “editcell” is executed twice and so on…

//Sample

dhxGrid1.attachEvent(“onRowSelect”, doOnRowSelected);
function doOnRowSelected(id,cellInd){
// Some Code
dhxGrid1.attachEvent(“onEditCell”, doOnCellEdit);
}

First time on editcell is called once then twice and so o…
Kindly Advise as soon as possible

It possible to attach multiple handlers to the same event, each time when attachEvent is called - new handler is added to the event, without removing previous one

So you must attach event only once, not for each selection

Hi,
I am trying to detach the “onrowSelect” event of Grid1 in “OnEditCell” event of Grid 2.
But i need to again attach the event on grid 1.

// Sample
rowSelId = dhxGrid1.attachEvent(“onRowSelect”, doOnRowSelected);
function doOnRowSelected(id,cellInd){
// Some Code
dhxGrid2.attachEvent(“onEditCell”, doOnCellEdit);
}

function doOnCellEdit(stage,rowId,cellIndex,nValue,oValue)
{
dhxGrid1.detachEvent(rowSelId);
//Some Code…
return true
}

I want to detach the"onRowSelect" event of grid1 in or befor “onEditcell” event of Grid2 and attach it gain after editcell is executed…Kindly provide a sample code for the same

You can use “stage” parameter to call methods before the user open cell or after cell editor is closed

docs.dhtmlx.com/doku.php?id=dhtm … oneditcell

[code]grid.attachEvent(“onEditCell”, function(stage,rId,cInd,nValue,oValue){
If (stage==0){
//code before cell editor is opened
return true; //<== mandatory
}
if (stage==2){
//code after cell editor is closed
return true; //<== mandatory
}

});[/code]