This is a migrated thread and some comments may be shown as answers.

Select Values from List

2 Answers 67 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jorge
Top achievements
Rank 1
jorge asked on 11 Sep 2009, 04:58 AM

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 Answers, 1 is accepted

Sort by
0
Robert
Top achievements
Rank 1
answered on 14 Sep 2009, 03:50 PM
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

0
Victor
Telerik team
answered on 17 Sep 2009, 08:20 AM
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
jorge
Top achievements
Rank 1
Answers by
Robert
Top achievements
Rank 1
Victor
Telerik team
Share this question
or