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

RadGrid Filtering stops working after first time Filtering

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sadie
Top achievements
Rank 1
Sadie asked on 06 Feb 2014, 03:08 PM
Hello,

Has anyone had this issue? I haven't changed my code but I have about 3 grid combobox filters and once I use one once, then they all stop working.

Here is the code I use for one that is the same for all of them:

<telerik:GridTemplateColumn ColumnGroupName="GeneralInformation" DataField="Status" AllowFiltering="True" HeaderText="Status" UniqueName="Status" HeaderTooltip="Status">
                               <ItemStyle HorizontalAlign="Center" />
                               <HeaderStyle Width="60px" BackColor="Navy" HorizontalAlign="Center" />
                               <EditItemTemplate>
                                   <telerik:RadDropDownList runat="server" ID="Statusdrop" DataValueField="StatusID"
                                       DataTextField="Status" DataSourceID="StatusFilter">
                                   </telerik:RadDropDownList>
                               </EditItemTemplate>
                               <FilterTemplate>
                                   <telerik:RadComboBox ID="StatusCombo" Skin="Silk" Height="100px" Width="50" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>'
                                       runat="server" OnClientSelectedIndexChanged="StatusIndexChanged">
                                       <Items>
                                           <telerik:RadComboBoxItem Text="All" Value="" />
                                           <telerik:RadComboBoxItem Text="G" Value="G" />
                                           <telerik:RadComboBoxItem Text="O" Value="O" />
                                           <telerik:RadComboBoxItem Text="Y" Value="Y" />
                                           <telerik:RadComboBoxItem Text="R" Value="R" />
                                           <telerik:RadComboBoxItem Text="M" Value="M" />                                       
 
                                       </Items>
                                   </telerik:RadComboBox>
                                   <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                                       <script type="text/javascript">
                                           function StatusIndexChanged(sender, args)
                                           {
                                               var tableView = window.$find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                               tableView.filter("Status", args.get_item().get_value(), "EqualTo");
                                           }
                                       </script>
                                   </telerik:RadScriptBlock>
                               </FilterTemplate>
                               <ItemTemplate>
                                   <asp:Label runat="server" ID="StatusLabel" Text='<%#Eval("Status") %>'></asp:Label>
                               </ItemTemplate>
                           </telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 11 Feb 2014, 01:15 PM
Hello Sadie,

I have already answered your support ticket so we could continue our conversation there. Nevertheless I will quoted my answer here.

"I reviewed your code and everything look properly set. I prepared a small sample based on the provided code and on my side work correctly. Could you please give it a try and let me know how it differs from your real setup? It would be best if you could replicate the issue in my sample or provide a small runnable one in order to observe it further."

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Sadie
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or