Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Steve Schreiner on Sep 24, 2008 12:53
open dhtmlx forum
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!
Answer posted by dhtmlx support on Sep 26, 2008 03:55
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:
http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/interaction_other_components/pro_combo.html
http://www.dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Combo_excell.html

Please, contact us at support@dhtmlx.com and we will provide you the sample of combo initialization via javascript.