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

RadGrid filtered by RadCombobox not filtering

1 Answer 23 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Zach asked on 08 Aug 2014, 02:09 PM
I have a Combobox and grid in a widget.  The grid needs to be filtered as the selection in the combobox changes.  Currently when the selection changes, the grid reloads, but always displays the same data.  Any ideas how to fix this?  Or even debug it?

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
<label for="NamesDDL">Select plant name to view its reports:</label>
<div style="margin-top: 15px;">
    <telerik:RadComboBox ID="NamesDDL" runat="server" AutoPostBack="True" DataSourceID="dllDataSource"
        DataTextField="PlantNameAndID" DataValueField="PlantID" Width="250px" Height="150px"
        AppendDataBoundItems="true" >
            <telerik:RadComboBoxItem Text="All" Value="0" Selected="true"></telerik:RadComboBoxItem>
<div style="margin: 15px 0 20px;">
    <telerik:RadGrid ID="OrdersGrid" AllowPaging="true" DataSourceID="gridSource" runat="server"
        GridLines="None" AllowSorting="true" HeaderStyle-ForeColor="Black" HeaderStyle-HorizontalAlign="Center">
<asp:SqlDataSource ID="dllDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:Dev-TestOilConnectionString %>"
    SelectCommand="select customer.plant.PlantID, customer.plant.PlantNo, customer.plant.PlantName, customer.plant.PlantID, cast(customer.plant.PlantID as varchar) + ' - ' + customer.plant.PlantName as PlantNameAndID from customer.plant where plant.CustID = 10 order by plant.PlantNo"></asp:SqlDataSource>
<asp:SqlDataSource ID="gridSource" runat="server" ConnectionString="<%$ ConnectionStrings:Dev-TestOilConnectionString %>"
    SelectCommand="select LabID, SampleDate, MachCond, LubCond, CustReview, CustReviewDte, machine.PlantID from customer.plant inner join customer.machine on machine.PlantID = plant.PlantID inner join sample.sample on sample.PointID = machine.PointID where ((machine.PlantID = @PlantID and @PlantID <> 0) or (machine.PlantID = machine.PlantID and @PlantID = 0)) and plant.custid = 10">
        <asp:ControlParameter Name="PlantID" PropertyName="SelectedValue" ControlID="NamesDDL"></asp:ControlParameter>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:AjaxSetting AjaxControlID="NamesDDL">
                <telerik:AjaxUpdatedControl ControlID="OrdersGrid" LoadingPanelID="AjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                <telerik:AjaxUpdatedControl ControlID="NamesDDL"></telerik:AjaxUpdatedControl>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 11 Aug 2014, 11:57 AM
Hi Zach,

The provided code looks correct. Could you confirm that the same issue persists when the combo and the grid are not in a widget?


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question