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

[Solved] Clear Filters button in Filter Row

4 Answers 256 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff Reinhardt
Top achievements
Rank 1
Jeff Reinhardt asked on 13 Oct 2009, 03:57 AM
I have a clear filters button outside of the RadGrid and it works great, is there anyway to move it inside the grid into the filter row ?

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2009, 05:24 AM
Hi Jeff,

Have you checked the online demo which shows how to add imagebutton in FilterTemplate of RadGrid to clear filter.
Filter Templates

If you want clear filter button for every column, then you can access the filteritem and add the imagebutton to particular column explicitly.

-Shinu.
0
Jeff Reinhardt
Top achievements
Rank 1
answered on 13 Oct 2009, 02:27 PM
<telerik:GridTemplateColumn UniqueName="ButtonExpandCollapse" AllowFiltering="false">  
                                    <FilterTemplate> 
                                        <asp:Button ID="btnClear" CssClass="button" runat="server" Text="Clear Filters" onclick="btnClearFilters_Click" /> 
                                    </FilterTemplate> 
                                    <ItemTemplate> 
                                        <asp:Button ID="btnExpandCollapse" Text="Details" CommandName="ExpandCollapseItem" runat="server" /> 
                                    </ItemTemplate> 
                                </telerik:GridTemplateColumn> 


I am geting this parsing error wheter I place this in a GridTemplateColumn or GridBoundcolumn:

 

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Type 'Telerik.Web.UI.GridTemplateColumn' does not have a public property named 'FilterTemplate'.

Source Error:

Line 114:                                <telerik:GridBoundColumn UniqueName="ProductLongDescription" DataField="ProductLongDescription" Display="False" AllowSorting="False" AllowFiltering="False" />
Line 115:                                <telerik:GridTemplateColumn UniqueName="ButtonExpandCollapse" AllowFiltering="false">
Line 116: <FilterTemplate>Line 117:                                        <asp:Button ID="btnClear" CssClass="button" runat="server" Text="Clear Filters" onclick="btnClearFilters_Click" />
Line 118:                                    </FilterTemplate>

Source File: /Viewer/default.aspx    Line: 116
0
Princy
Top achievements
Rank 2
answered on 14 Oct 2009, 05:38 AM
Hello Jeff,

I suppose you are using an older version of the RadGrid. The FilterTemplate functionality was added since the
Q1 2009 (i.e., version 2009.1.311) version of the grid. Thus, if you are using an older version, you would have to upgrade your RadGrid to the later version to be able to use the FilterTemplate for a column. You may find the following kb article helpful, if you plan to upgrade your controls to the latest version:
Updating RadControls for ASP.NET to another version or license

Thanks
Princy.
0
Jeff Reinhardt
Top achievements
Rank 1
answered on 15 Oct 2009, 12:42 AM
That was it, I upgraded to the latest version and it works perfectly.

Thanks!
Tags
Grid
Asked by
Jeff Reinhardt
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Jeff Reinhardt
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or