Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Setting ValueList in WebGrid Column Javascript
posted

I am able to set up a two-dimensional array using Javascript and bind it to the ValueList of an UltraWebColumn.  The only thing that goes wrong is that the DisplayStyle seems to get ignored afterward and, even though the drop down displays text, once I select an item, the value member, not the display member, shows up in the cell.  I am using 7.2 for .NET 2.0 - anybody have any ideas?

Thanks

  • 210
    posted

    Make the data type of your dropdown column "System.String"

    and put your javascript data in quotes, all of your data goes in quotes.

    like this...

    var myLocationTypes = [

    ["0", ""],

    ["1", "Marina"],

    ["2", "Terminal"],

    ["3", "Refinery"],

    ["4", "Manufacturing Facility"],

    ["5", "Historical Vessel"],

    ["6", "Wharf"],

    ["7", "Pier"],

    ["8", "Shipyard"]

    ];

     

    use double quotes too, no singles.