Select Values from List

3 posts, 0 answers
  1. jorge
    jorge avatar
    5 posts
    Member since:
    Jun 2009

    Posted 10 Sep 2009 Link to this post

    Hi, i have the following RadComboBox binding:

    st_AfectaStock.DataSource = mgrStockTipo.ListarStockTipos(0)

     

    lst_AfectaStock.DisplayMember =

    "STP_NOMBRE"

     

     

     

    lst_AfectaStock.ValueMember = "STP_ID"

    The problem: when the user type a value (not in the list) on the ComboBox, the SelectedValue = Nothing.

    how can i solve this problem?

    Regards!

  2. Robert
    Robert avatar
    82 posts
    Member since:
    Jun 2009

    Posted 14 Sep 2009 Link to this post

    Hi Jorge,

    I'm not sure why your SelectedValue is nothing. In testing this, my SelectedValue seemed to remain at the last selected item when I typed a value that was not in the list.

    In your situation though, are you wanting to retrieve the text that the user types? If so, you should be able to do this by accessing the Text property of the RadComboBox.

    If (RadComboBox1.SelectedValue = NothingThen 
        MessageBox.Show(RadComboBox1.Text) 
    End If 

    I hope this helps.

    - Robert

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 17 Sep 2009 Link to this post

    Hello Shoerob,

    Thank you for writing. I am afraid that we do not know why ComboBox SelectedValue is Nothing. RadComboBox SelectedValue is not nothing when you type a value that does not exist. If you are referring to our RadComboBox instead of the standart ComboBox, please provide more details on how to reproduce this behavior.

    Regards,
    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top