Hi Team,
I have few issues questions regarding having a combo list in the grid cell
(1) drop down list height: How can we control the height of the drop down list when editing a cell?
(2) drop down list not closing: In order to programatically send a grid cell into edit mode we call grid.cells(rowId, colId).edit(). This will indeed open the cell for editing which is a combo type, but the trouble is that the list does NOT close even if we select an option or tab off the cell, we can NOT get it to close!
(3) Initializing grid with combo options:When setting up the grid object to have combo type column. I know we can set the combo option values using the XML style by calling grid.loadXML(header.xml), but when we try to upload the cell data using loadXML(data.xml) we get error “object required”, I suspect because the next loadXML() will clear the header columns. Why its crashing to upload data after initializing the grid with XML?
Thanks,
Daniel
- You can set list height in the dhtmlxcombo.js:
.dhx_combo_list{
…
height:100px;
…
}
Or set it using combo API:
var combo = grid.getColumnCombo(column_index);
combo…setOptionHeight(height);
2) It is better to use selectCell in order to set cell into edit mode:
grid.selectCell(row_index,column_index,0,0,true);
If problem with closing editor persists, please, contact us at the support@dhtmlx.com
/-- quote -------------------------/
var combo = grid.getColumnCombo(column_index);
/---------------------------------/
Hi,
there is no such function (getColumnCombo) in grid API? My column is not a combo type, it is of “co” type, just normal select box.
Daniel,
/- quote ------------------------------------------------
2) It is better to use selectCell in order to set cell into edit mode:
grid.selectCell(row_index,column_index,0,0,true);
/----------------------------------------------------------/
tried that, didn’t work!
var rowInd = grid.getRowIndex(rowId);
grid.selectCell(rowInd,0,true,true,true);
– From API --------------
selectCell(r,cInd,fl,preserve,edit,show)
set selection to specified row-cell
/-- quote -------------------------/
var combo = grid.getColumnCombo(column_index);
/---------------------------------/
Hi,
there is no such function (getColumnCombo) in grid API? My column is not a combo type, it is of “co” type, just normal select box.
Daniel,
It can be changed in the edit() method of “co” excell in the dhtmlxgridcell.js: (line 976) :
this.list.size=“6”; /* you can changed another number of displayed options */