I am trying to implement filtering using combo boxes via javascript. The filtering itself works fine. The problem arises when the combo box list for column B is dependent on the selection in column A. To address the dependency, when the user applies a filter to column A, I want it to also clear the filter for column B. I tried adding a call to clear the filter for column B just prior to setting the filter on column A (see below), but it appears to be producing a double postback which hangs the browser. Clearing the filter on column B, and applying the filter on column A, each work by themselves (if I comment out the other). The hang only occurs when I try to do both.
I believe what is happening is that clearing the filter on column B is causing a postback. Then applying the filter to column A is causing another postback. The second postback cancels the first...but the browser doesn't realize it and waits for the first postback to time out.
So...the question is...is there a way to modify both filters at the same time so that it only produces a single postback?
I believe what is happening is that clearing the filter on column B is causing a postback. Then applying the filter to column A is causing another postback. The second postback cancels the first...but the browser doesn't realize it and waits for the first postback to time out.
So...the question is...is there a way to modify both filters at the same time so that it only produces a single postback?
<FilterTemplate> <telerik:RadComboBox ID="dpdDataCllctnTypFilter" DataSourceID="dsDataCllctnTypFilter" Width="100%" DataTextField="Nm" DataValueField="Nm" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("A").CurrentFilterValue%>' runat="server" OnClientSelectedIndexChanged="dpdDataCllctnTypFilterChanged" OnSelectedIndexChanged="cboDcTypFilter_SelectedIndexChanged" > <Items> <telerik:RadComboBoxItem /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> <script type="text/javascript"> function dpdDataCllctnTypFilterChanged(sender, args) { var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>"); var s = args.get_item().get_value(); tableView.clearFilter("B"); // Added to clear the filter on column B if (s == '') tableView.clearFilter("A") else tableView.filter("A", s, "EqualTo"); } </script> </telerik:RadScriptBlock></FilterTemplate>