Categories | Question details Back To List | ||
Height of combo list in grid 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 Answer posted by Support on Sep 19, 2008 02:01 1) 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 and we provide you the sample with the latest combo excell version. 3) The issue was fixed in the latest combo excell version. Please, contact us at the support@dhtmlx.com Answer posted on Sep 24, 2008 19:54 /-- 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, Answer posted on Sep 24, 2008 20:06 /- 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 Answer posted on Sep 24, 2008 21:43 /-- 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, Answer posted by dhtmlx support on Sep 25, 2008 07:36 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 */ |