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

[Solved] Related Combobox selectedvalue

3 Answers 120 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 08 Apr 2009, 01:32 PM
Hi,

we try the evaluation version of rad control and for now we like it very much.

i have a problem with the sample related combobox
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultvb.aspx

is it possible to acces selectedvalue ou value properties in code behind ?

the demo work good but if you try to retrieve the selectedvalue, it's always nothing. I just add a button and on the click event try to retrieve the selectedvalue.

I can put the selectedvalue in hiddenfield but if i can retrieve the selectedvalue i'll prefer,

thanks for your help and btw tools and support are very good.

Eric

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 08 Apr 2009, 03:06 PM
Hi Eric,

Welcome to the Telerik Community.

I am glad to hear that you like our controls and I hope they will help you in your daily job.

I have put a button on the aspx page and added the following code for the OnClick handler:

protected void Button1_Click(object sender, EventArgs e) 
   string s = string.Format("{0}, {1}, {2}"RadComboBox1.SelectedValue, RadComboBox2.SelectedValue, RadComboBox3.SelectedValue); 
   Response.Write(s); 

After I clicked the button I was able to see the values of the selected items.

Please find attached a sample running project. Download it and give it a go.
Just add the Telerik.Web.UI assembly to the Bin folder

All the best,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Eric
Top achievements
Rank 1
answered on 08 Apr 2009, 09:40 PM
thanks

i forgot to tell you that i remove this in the sample because the event fire twice, after that i can't retrieve the selectedvalue
OnItemsRequested="RadComboBox1_ItemsRequested"
OnItemsRequested="RadComboBox2_ItemsRequested"
OnItemsRequested="RadComboBox3_ItemsRequested"
0
Veselin Vasilev
Telerik team
answered on 09 Apr 2009, 07:34 AM
Hi Eric,

I suggest that you open a support ticket and attach a sample project there. We will check it and modify it so it works per your requirements.

Thanks

Kind regards,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Eric
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Eric
Top achievements
Rank 1
Share this question
or