Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Allan Hansen on Feb 12, 2009 01:23
open dhtmlx forum
Manually adding values to coro (not via XML)

Is it possible to tell a coro which values it should contain noget through XML?
Answer posted by dhxSupport on Feb 12, 2009 02:27
grid.cells(id,ind).cell will give access to HTML element of cell, and you need to use DOM methods to access the necessary element and change its value

Answer posted by Alex (support) on Feb 12, 2009 02:31

You can use put(key,value) method to add new option into the coro:

var coro = grid.getCombo(column_index);

coro.put(key1,value1);

...

coro.put(keyN,valueN);

Answer posted by Allan Hansen on Feb 12, 2009 02:44
I set mygrid.setColTypes( to coro, does this work with your answers?
Answer posted by Alex (support) on Feb 12, 2009 03:27

Yes, getCombo and put must work for coro. 

For example, this approach is used in the sample dhtmlxGrid/samples/header_footer/grid_complexheader.html 

Answer posted by Allan Hansen on Feb 12, 2009 04:14
Thanks guys. That helped...