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

Combo Value missing in ItemsRequested Event

1 Answer 49 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tiju
Top achievements
Rank 1
Tiju asked on 26 Nov 2010, 06:37 AM
I am using two combo boxes.Both are binding in ItemsRequested  event.After selecting value in first combo,i have to use the selected value in ItemsRequested  event of the second combo.but selected value missing in this event.
When i gave Autopostback true to first combo ,i got selected value.But in my case i dont want to use Autopostback true.
Please provide a solution as soon as possible.

Thanks
Tiju

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 26 Nov 2010, 05:27 PM
Hello Tiju,

Since RadComboBox uses callbacks when performing the ItemsRequested event, it doesn't know the selected value of the other controls, unless a full page postback is performed. So pretty much your second RadComboBox only knows the SelectedValue of the first RadComboBox, when the page loaded, which is most likely blank. If you don't want to set the AutoPostback to true, you can handle the OnClientItemsRequested event and create a context that passes the selected value of the first RadComboBox, along with the text the user typed in. This help article shows how to use a context with the ItemsRequested event:

http://www.telerik.com/help/aspnet-ajax/combo_loadondemandadditionalattributes.html

I hope that helps.
Tags
ComboBox
Asked by
Tiju
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or