Hi there,
How can I get the selected value in the combo box present in the grid. ???
for co|coro cell types
grid.cells(id,ind).getValue() - value of selected option
grid.cells(id,ind).getTitle() - label of selected option
Hi there,
I am still not able to get the selected value in the combobox, it shows the whole html tags of select.
Actually I have embedded the select tag in the cell while constructing the XML.
How to do this ?
The code above related to the co|coro excells.
If you embed custom HTML in grid’s cell, you can locate container HTML tag as
grid.cells(id,ind).cell
and use any necessary DOM manipulations from this point.
Most probably it will look as
grid.cells(id,ind).cell.firstChild.value
Hi,
Just like we get the value of the combo box, How we can set the value to the combobox in Grid where combobox is embedded in XML itself and not thru DHX. ???
The grid provides unified way to set data for any cell type
grid.cells(id,ind).setValue(new_value)
This will work for any type of combo, supported by grid (“co”,“coro”,“combo”)
If you are using custom HTML solution the
grid.cells(id,ind).cell
will give access to HTML element of cell, and you need to use DOM methods to access the necessary element and change its value
Hi,
How to keep one of the items present in the combobox as selected by default ??
The current value of cell will be preselected on combo opening , there is no way to have different option preselected ( unless you will use tricky manipulations from onEditCell event handler )
Hi there,
Can you gimme some example ??
from onEditCell stage 1 , it is possible to access the select object as grid.editor.list, and use any DOM methods to change its state.
Hi,
I want to set the value to the combobox(HTML Combobox, not DHX) written in XML creation.
I used following
.cells(rowId,cellIndex).cell.firstChild.setValue(1)
It works fine in Mozilla FF, but not in IE6 and 7. Why ?
If it is a native select box control , then the valid code will be
.cells(rowId,cellIndex).cell.firstChild.value=1;