version 4 grid combo cell type loading XML

Hi

I have a simple grid of 4 columns. I need the last column to be a combo that gets the list of options and their values from the server when the grid is configured. I have put the code fragment below.

The problem is that I get an error “loadXML is not a function” on the combo. I also tried using ipGridCombo.load (not xml) but with the same problem. I have researched this extensively and found various articles but none have solved the problem.

Can someone help with this please ?

thanks in advance

	ipGrid = ipLayout.cells('a').attachGrid();
	ipGrid.setImagePath("lib/dhtmlx/imgs/");
	ipGrid.setHeader("Pin,Name,Mobile,Company");
	ipGrid.setColumnIds("pin,name,mobile,companyID");
	ipGrid.setColTypes("edn,edtxt,edtxt,combo");
	ipGrid.setInitWidths("110,200,200,200");
	ipGrid.setSkin("dhx_skyblue");
	ipGrid.enableAutoSaving();
	ipGrid.init();
	url = urlPlusRandom("php/installers.php");
	ipGrid.load(url);
	ipGridCombo = ipGrid.getCombo(3);
	//consoleLog(ipGridCombo);
	ipGridCombo.load(url+"&act=loadCombo");	
	
	ipDP = new dataProcessor(url);// initializes dhtmlxDataProcessor
	ipDP.init(ipGrid);
	ipDP.setVerificator(1,not_empty);
	ipDP.setVerificator(2,not_empty);
	ipDP.setVerificator(3,not_empty);
	ipDP.setUpdateMode('row');
	ipDP.attachEvent("onEditCell",doOnEditCell);

WORKAROUND

The undocumented “put” method on the object returned by grid.getCombo(colInd) allows you to add a single option to the combo.

So you can get the list from the server then add the items from the list in a loop.

Doco - pretty poor in these areas

I apologize for the blind places in the documentation.
We’re working on it’s improvement.

Here you can find the documentation about the usage of co/coro in the grid:
docs.dhtmlx.com/3.6/doku.php?id= … n_from_xml