Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by zu jianing on Jun 25, 2009 19:21
open dhtmlx forum
make one column editable

Hi

i used mygrid.setEditable(false) to make the grid's all columns can't be edited, but now i want to

the third column was editabled, how can i do this?
Answer posted by dhxSupport on Jun 26, 2009 04:34
You can disable\enable cells in grid using setDisabled(true|false) cell's method:
mygrid.cellById(rowId,cellIndex).setDisabled(true);
Also you can change type of the column\row\cell dinamically (change it from "ro" to "ed"). 
setRowExcellType(rowId, type) - set excell type for all cells in specified row 
rowId - row ID
type - type of excell
setColumnExcellType(colIndex, type) - set excell type for all cells in specified column 
colIndex - column index
type - type of excell
setCellExcellType(rowId, cellIndex, type) - set excell type for cell in question 
rowId - row ID
cellIndex - cell index
type - type of excell (code like “ed”, “txt”, “ch” etc.)

These methods are availible in PRO version only.