DHTMLXGrid and Combo - load the cell combo using other colum

Hi,



I’m sure this has been asked before but I cannot find any reference to it.



I have a grid which contains a number of columns:

4 of these are “weight”," height",“length” and “width”.

I have another column which displays a list of delivery services in a combo box.



In this combo I need to only show the services for a given “weight”," height",“length” and “width”. In other words the combo options depend on the values in the other 4 columns.



What is the best way to do this?



many thanks


Hello,


You can use onEditCell event handler. When the value in one of the described columns changes, the combo in the last column and in the same row must be reloaded with new values.


In case of using “combo” excell:


grid.attachEvent(“onEditCell”,function(stage,id,index){


if(index !=4){


var combo = grid.cells(id,4).getCellCombo();


combo.clearAll();


combo.loadXML(url+"?weight="+grid.cells(id,0).getValue()+"&height="+grid.cells(id,1).getValue()+…);


}


return true


})


Hi



Thanks for your very quick reply - I’m getting the following result in firebug

mygrid.cells(rowID, 10).getCellCombo is not a function
 
" var combo = mygrid.cells(rowID,10).getCellCombo();"

 


I'm using the Pro code - Have I included all the right code as listed below?


















Hello,


Please, check the type of the 11th column is “combo”.


There is an issue in the provided code:


please, try to use


if((index !=4) && (stage == 0)){


instead of


if(index !=4){


If problem persists, please, provide the sample to reproduce the issue (wihthout grid libraries files)

Thank you for help with resolving this. it is now working thaks to you