Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Anuj on Aug 26, 2008 23:56
open dhtmlx forum
Disable Perticular Cell dynamicaly

hi

Can we disable perticular cell dynamicaly.
There are two colums A & B.

A colum contain combo values Train,Flight,Road

if i select Train or Flight in colum A then Colum B cell must be disbabled

else

Colum B cell is editable

Thanks and Regards
Sharma Anuj
Answer posted by Support on Aug 27, 2008 02:18
You can use onEditCell event with setCellExcellType method similar to next

grid.attachEvent("onEditCell",function(stage,id,index,value){
    if (stage == 2 && index==0) {
         if (value=="Train") grid.setCellExcellType(id,1,"ro"); //disable
         else grid.setCellExcellType(id,1,"ed"); //enable
    }
    return true;
})