in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

Combobox problem

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

    Combobox problem

    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
  • 6/19/2009 11:00 AM In reply to

    Re: Combobox problem

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

Copyright © 1998-2010 Developer Express Inc.
ALL RIGHTS RESERVED