Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by TC on Jan 14, 2008 06:05
open dhtmlx forum
Changing the cell values based on a combo box selected value

Hi,

I have a column on the grid which is a combo box type and i would like to change the values of the cells in a row based on the selected combobox value. How can i do that??
Answer posted by Support on Jan 14, 2008 06:51
You can use onEditCell event ( it will work for any column type )

grid.attachEvent("onEditCell",  function(stage,id,ind,value){
    if (stage == 2 && ind == INDEX ){
          //any code here
          // id - id of row
          // value - new value of cell
    }
    return true;
});


where INDEX - index of column in which combo placed in your case