I have 3 combo boxes on a page, combo1, combo2 & combo3
the contents of combo2 are filtered by the selected value in combo1
the contents of combo3 are filtered by the selected value in combo2
I need to obtain the currently selected value in combo1 as an additional filter value for combo box 3 and was given an example involving a context filter. This example is stuck in an endless loop. heres the code for the combo
heres the javascript function
and the c#
the Itemsrequested event is being fired in an endless loop !
can you help ? The LoadCategories method needs the value currently selected in the RadComboBoxType as part of the filter
the contents of combo2 are filtered by the selected value in combo1
the contents of combo3 are filtered by the selected value in combo2
I need to obtain the currently selected value in combo1 as an additional filter value for combo box 3 and was given an example involving a context filter. This example is stuck in an endless loop. heres the code for the combo
<telerik:RadComboBox ID="RadComboBoxCategories" Runat="server" Width="100%" OnClientItemsRequested="ItemsLoaded" OnClientItemsRequesting="ClientItemsRequesting" |
onitemsrequested="RadComboBoxCategories_ItemsRequested" Skin="Default" EnableLoadOnDemand="true"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> <
telerik:RadComboBox ID="RadComboBoxType" Runat="server" OnClientSelectedIndexChanging="LoadGenres"
onitemsrequested="RadComboBoxType_ItemsRequested" Skin="Default"
Width="100%" EnableLoadOnDemand="true" AutoPostBack="False"
onselectedindexchanged="RadComboBoxType_SelectedIndexChanged">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
|
heres the javascript function
function ClientItemsRequesting(sender, eventArgs) { |
var context = eventArgs.get_context(); |
var typeCombo = $find("<%= RadComboBoxType.ClientID %>"); |
context["FilterString"] = typeCombo.get_text(); |
} |
protected void RadComboBoxCategories_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e) |
{ |
string temp = e.Context["FilterString"].ToString(); |
LoadCategories(e.Text, temp); |
} |
can you help ? The LoadCategories method needs the value currently selected in the RadComboBoxType as part of the filter