Forums

Combobox problem

Last post 6/19/2009 11:00 AM by Patrice Cote. 1 replies.
Sort Posts: Previous Next
  • Carsten Berger

    Combobox problem

    6/19/2009 9:22 AM
    • Not Ranked
    • Joined on 4/8/2008
    • Zaandam, The Netherlands
    • Posts 21

    Hi,

    I have a question about the ASPxComboBox!

    I have a aspformview that is bound to a datasource.
    In this formview i have a combobox with a list of oilstorage tanks.

    The combobox gets it items from a table with all the availiable tanks bound to the combobox like: ValueField="stoNumb" TextField="stoName"

     This is what i have so far:

     

    <dxe:ASPxComboBox id="ASPxComboBox1" runat="server"

     

    Width="200px" Value='<%# Bind("wnTankID") %>' ValueField="stoNumb" TextField

    ="stoName"

     

     

     

    MaxLength="128" DataSourceID="dsTanks" ValueType

    ="System.Int32">

     

     

    </dxe:ASPxComboBox>

    As you can see, the text for the combobox has to be a tank name (stoName) and the value a tank id (stoNumb).
    Instead of displaying the tankname (stoName) he's showing me the tank id (stoNumb)  in the comboboxtext.
    What i want is that it shows me the associated tankname in the combobox, so he has to display the stoName field instead of stoNumb.

    How do I manage it? It is like SelectedValue in the standard dropdown from microsoft.

     

    Thank you

    Webdeveloper at SOLIT Application Design, Zaandam, The Netherlands
  • Patrice Cote

    Re: Combobox problem

    6/19/2009 11:00 AM
    • Not Ranked
    • Joined on 5/1/2009
    • Posts 31

     Why do you use this value "wnTankID" if you just need "stoNumb" as the value and "stoName" as display text ?

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.