When exactly is the render method called on a combo.

If I have set render(true) on a combo then when exactly does this get called?

  1. When a new selection is made

  2. When a new option is added to the combo box

What happens when this method is called?

render method is not public.

Why did you ask about it ?

The render method is shown in the API as follows:

render(mode)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxcombo.js

enable/disable immideatly rendering after changes in combobox

*
  mode - (boolean) enable/disable

The reason I asked about it is because right now my data gets loaded in the grid BEFORE the combo options do and so instead of seeing the Option Text the system displays the Option Value which is a code that my users don’t understand. I was hoping that the render method my ‘reformat’ the cell after an option had been added. That way the Option Text would show rather than the Option Value.

Is there any other way of achieving this?

Thanks for your help.

Sorry for the misleading information. There was a mistake in the documentation - render method is private. And it can not solve the problem you have described.

There could you two solutions:

  1. to load grid data after combo data:

var combo = grid.getColumnCombo(columnIndex); combo.loadXML("combo.xml",function(){ grid.loadXML("grid.xml") })

  1. to call setValue for the grid cells after grid data is loaded:

grid.loadXML("grid.xml",function(){ grid.forEachRow(function(rowId){ var value = grid.cells(rowId,columnIndex).getValue(); grid.cells(rowId,columnIndex).setValue(value); }) })

In both samples columnIndex is index of the “combo” column