I have two ComboBoxes on my page, I need to get the selected value from the first one on the ItemsRequested event of the second one server side, I'm getting null.
1 Answer, 1 is accepted
0
Rosi
Telerik team
answered on 22 Jan 2008, 01:47 PM
Hi Pablo Tola,
I suggest to achieve your approach by hooking on OnClientItemsRequesting event of the second combo and setting the context property:
function OnClientItemsRequesting(sender,eventargs)
{
var combo = $find("RadComboBox1"); //this is the first combo
var c = eventargs.get_context();
c["ComboValue"] =combo.get_value();
c["ComboText"] = combo.get_text();
}
Then you can get these values in the ItemsRequested in the following way:
protectedvoid RadComboBox2_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
string value = e.Context["ComboValue"].ToString();