Grid: Options in combo box

I am loading the configuration of the Grid in XML, including the options to be shown on the select box (coro) of a particular column, but depending on the data some options should not be available for some rows.



Ideally, the non-available options should not be shown… Is this possible? If not then I guess I will have to build in a validator to determine whether the selection is valid. Any other ideas?



Thank you!

There are two ways to implement required behavior

a) You can change list of options dynamically while starting edit operation
    dhtmlx.com/docs/products/dhtmlxG … combo.html

or

b) You can define separate options list for different rows. ( while it not included in official list of supported features latest version allow to define it in XML as

   
       value
             1
             2
             3
      
   
   

I have the latest version of dhtmlxgrid (dated in 2008), but this is not working for me.  The only option that appears for the cell is the cell’s value.

   
        Status:
       
            1
            Inactive
            Active           
       
       


I’ve also tried using the text “Inactive” or “Active” for the cell’s value, but I get the same result - the only option that appears in the list is the exact value of the cell.

Please try to use

   
        Status:
        1Inactive
            Active           
       
     

Thanks.  That works, but I cannot figure out how to select an item in the list.

This results in the cell displaying “1”, and the option “1” appended to (and selected) the end of the list.  I would assume this would be the correct method.


    Status:
   
        1
       
Inactive
        Active           
   
 

This results in the correct text displayed for the cell, but when I pull up the option list it contains an extra “Active” option at the end of the list, which is selected.


    Status:
   

        Active

       
Inactive
        Active           
   
 



I’ve tried a couple other things to no avail, but cannot pre-select a specific option.

The problem is that value taken from XML without triming



        1

       
Inactive

        Active



value of cell taken as "      1         " - whitespaces around digit taken
in account, there is no related option, so “Active” not shown

1Inactive

        Active



value of cell taken as “1” - there is option with exactly the same value and “Active” correctly shown