Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rasmit on Jun 10, 2009 04:09
open dhtmlx forum
make Editable grid cell

Hi,
I created a grid from a XML. I used the syntax : mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro") , to make the cells non editable.
But after selecting the radio btn in the row i want to make the 8th cell of the selected row to be editable.

Kindly provide some solution.

thanks & regds,
Rasmit.
Answer posted by dhxSupport on Jun 10, 2009 04:31
You can change cell's type with method mygrid.setCellExcellType(rowId, 8, "ed"). This method is availible in PRO version only.
There is other "free" solution:
1) set 8th cell as "ed" and block it with setDisabled() method:
mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ed,ro,ro")
...
mygrid.load("grid.xml",function(){
   mygrid.cellById(rowID,8).setDisabled(true);
});

2) Attach onclick event to the radio button and set 8th cell and un disabled:
<input type="radio" onclick="mygrid.cellById(rowID,8).setDisabled(false);" />