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

combobox becomes empty on postback

12 Answers 183 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 18 Apr 2008, 08:17 PM
I have a combobox with enableloadondemand.

On a postback the dropdown does not contain any value.
I want the dropdown to retain the values.

I was using Q3 earlier and with externalcallbackpage i never faced this problem.

Any suggestions?

12 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Apr 2008, 11:15 AM
Hi there,

RadComboBox items added on demand via callback do not persist after postback as these items are added only at the client-side (not at the server). However, you can access the selected value at the server side by calling the SelectedValue property of the combobox (this is valid for RadComboBox as part of Telerik.Web.UI. With the classic version of the control, you had to use the Value property of the RadComboBox object).

Hope this helps.

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 28 Apr 2008, 10:27 PM
The SelectedValue for the ComboBox Selected item comes as blank.

The only thing I get is the Text.
0
nis
Top achievements
Rank 1
answered on 28 Apr 2008, 11:15 PM
Yes, I am also facing the same problem. The selectedvalue property doesnot consistently return the value. Even the Text property doesnt return the value


Please help!!!!
0
nis
Top achievements
Rank 1
answered on 28 Apr 2008, 11:33 PM
And one more thing to add here I checked request.form where telrik as for each combo 2 key input and client state and both of them was empty for one of my combo while the other two were holding the values....


Why so alll of them are on the same control...
0
Rosi
Telerik team
answered on 29 Apr 2008, 08:12 AM
Hello ,

I think that the best way to proceed is to send us a simple running project illustrating the problem.

We will test it locally and provide you with a solution or more specific instructions.


Kind regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
newbie
Top achievements
Rank 1
answered on 29 Apr 2008, 03:59 PM
I had a Page.DataBind() statement that was creating the problems for me.
After I removed the statement the SelectedValue is available to me.
0
nis
Top achievements
Rank 1
answered on 29 Apr 2008, 11:22 PM
Hi,
I had viewstate disabled which was creating the problems. Now I am getting selectedvalue too.

Thanks,
Nis
0
DaveL
Top achievements
Rank 1
answered on 13 May 2008, 10:33 PM
Why do we have to turn the viewstate on for this to work?
We have the same problem...it worked with the prometheus q3 version.  But now as I'm trying out the new version it dosent work anymore.  Turning the viewstate on is something we want to avoid.

It worked perfect before and it works with asp DropDownLists

address

.AddressTypeId.ToString();

0
Rosi
Telerik team
answered on 14 May 2008, 08:43 AM
Hi DaveL,

Please find attached our latest internal build. Download it and give it a try.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
illumination
Top achievements
Rank 2
answered on 27 Feb 2009, 01:52 PM
I am having this same problem which I can't find the answer to and I'm using Q3 1314 version. Anybody can help?
0
Veselin Vasilev
Telerik team
answered on 02 Mar 2009, 08:50 AM
Hello illumination,

Can you please describe your problem in more detail?
You can paste some relevant code here if it is not too big.

Thanks

Sincerely yours,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
illumination
Top achievements
Rank 2
answered on 02 Mar 2009, 12:58 PM
I got this to work by putting SelectedValue = ...
Thank you so much for the reply.
Tags
ComboBox
Asked by
newbie
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
newbie
Top achievements
Rank 1
nis
Top achievements
Rank 1
Rosi
Telerik team
DaveL
Top achievements
Rank 1
illumination
Top achievements
Rank 2
Veselin Vasilev
Telerik team
Share this question
or