Hi,
Trying to create combobox in grid without success . Field type directed ‘combo’ .
Here is source :
var t_n = [ { value: 0, text: "Ne" }, { value: 1, text: "Taip" } ];
var combo = myGrd.getCombo( cmbNum );
//combo.enableFilteringMode( true );
combo.addOption( t_n )
//combo.loadXML( 'tn_' + $app_lng + '.xml' );
/* xml file -
<?xml version="1.0" ?>
<complete>
<option value="0">Ne</option>
<option value="1">Taip</option>
</complete>
*/
Trying to do ‘addOption’ or load xml file - it return error : Uncaught TypeError: undefined is not a function . Also it return error on “enableFilteringMode” .
What I’m missing here ?
Thanks in advnace …
OK, I found that for column must be myGrd.getColumnCombo( cmbNum ) function . I changed to that - now it run without errors , but editing I’m seeing only 0 and 1 , no labels …
OK , found the solution … In earlier I did combo before grid init . After init it works … But it works not clear - combobox show 4 lines - “Ne”, “Taip”, “0” and “1” . How to avoid showing 0 and 1 ?
Nothing can’t to help ? Can’t to find - why in options appears 0 and 1 ?
Please, provide provide with a more detailed actual sample of your code where the init of the grid can be found and the init of the combo, a sample of the data loading to the grid and a sample of the data loading to the combo.
such issue may occur when the value of the cell differs from the value of the option (even the space in the value make difference: “0”!=" 0 ")