grid and combos

I would like to use a dhtmlcombo for certain column cells in my grid, but we are using json to initially load the grid. We are also using javascript to manually configure the grid columns at initialization…



1) Using javascript how do I configure a column to use a dhtmlxcombo? I cant find column settings for filter, source, editable and cache.



2) I see there are javascript methods for getCustomCombo(id, ind) and getCombo(col_ind), but I cant find setCustomCombo() or setCombo() in the api. How can I assign a combobox to a grid cell? Upon the first stage of editing a cell, I want to manually set a combobox for that cell and display it for the user.



3) I’m confused between getCustomCombo and getCombo?



4) how can I use json to load a dhtmlxcombo?



Thanks!

Grid provide combo,co and coro types. getCustomCombo(id, ind) and getCombo(col_ind) are “co” and “coro” methods.

>> but I cant find setCustomCombo() or setCombo() in the api

In order to set cell type you can use setCellExcellType(rowId, cellIndex, type) method:

    grid.setCellExcellType(rowId, cellIndex, type);

This method can be use after data is loaded in grid.

>> Using javascript how do I configure a column to use a dhtmlxcombo

If you want to use dhtmlxcombo in cell/column, you need “combo”  type. This type is available only in the professional version.
The sample and article is:
support@dhtmlx.com and we will provide you the sample of combo initialization via javascript.



Hi,

We are using XML to load grid.Once grid gets initialized, we want to change few column types as combo from ro type.
If we try to change this using setColumnExcellType method, we are getting error in setValue method that combo is not defined.

Could you please tell us how to initialize combo field with all properties once grid has been initialized?

Thanks
Amit

You can do the next

a) change the column type to combo
b) in xml, for all cells in that column set
data

So the column type will be combo, but all cells will be rendered as ro.
If you will change some cell type to combo - it will not cause any errors.

Hi

Can u please see the attached sample. In that we are trying to change the column type to combo and we are getting error in setValue (of dhtmlx_excell_combo.js) method.

Can you please see the issue and provide us detailed solution.

Thanks,
Amit
comboSample.rar (164 KB)

Check the updated sample
comboSample2.zip (176 KB)