Combo for "tree" field of TreeGrid

Is it possible to use a combo in the tree field of TreeGrid?

If so, how?

Hi, to read: … combo.html … combo.html … combo.html

Unfortunately it is not available to use the combo in a tree column of the treegrid.

Thank you for the quick response.

As an alternative, I am adding an extra column for the combo box.

I have combed through the documentation for over an hour and there is no simple example on how to do this.

I DO NOT want to define the grid with JSON or XML.

Instead, how do I, using JavaScript:

  1. Create a ComboBox object
  2. Attach it to a column in a grid (in this case, a TreeGrid column)
  3. Populate the choices from either code, JSON, or XML

There are bits and pieces of examples scattered all over the documentation, but no simple, definitive explanation on how to do this.

Also, if the answer includes loading from XML, please specify the exact XML format. The documentation is so unclear about these things, it’s really frustrating sometimes (most of the time actually).

Finally found it (it wasn’t easy).

Apparently “combo” and “co” types are controlled completely differently.

For “combo”:

comboEvent = tg.getColumnCombo(COL_EVENT_TYPE); comboEvent.addOption([ ["GiveQuest","GiveQuest"], ["ModifyFaction","ModifyFaction"], ["SetFlag","SetFlag"], ["FlagRequired","FlagRequired"], ["FlagForbidden","FlagForbidden"], ["QuestRequired","QuestRequired"], ["QuestForbidden","QuestForbidden"] ]);

for “co” and “coro”

comboEvent = tg.getCombo(COL_EVENT_TYPE); comboEvent.put("GiveQuest","GiveQuest"); comboEvent.put("GiveQuest","GiveQuest"); comboEvent.put("ModifyFaction","ModifyFaction"); comboEvent.put("SetFlag","SetFlag"); comboEvent.put("FlagRequired","FlagRequired"); comboEvent.put("FlagForbidden","FlagForbidden"); comboEvent.put("QuestRequired","QuestRequired"); comboEvent.put("QuestForbidden","QuestForbidden");

Here you can find a tutorial about using the select-boxes co/coro: … ction.html
and a “combo” exCell: