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

[Solved] how to hide rad grid filter list option

1 Answer 280 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahesh
Top achievements
Rank 1
Mahesh asked on 13 Aug 2013, 09:45 AM
Hi All,

I have a rad grid in my page. I need to provide filter option for 4 columns. we need only "EqualTo" filter.

What i need is that, filter button should show in the header. And will clicking on the button, the options should not show. While clicking on the button, the grid should filter for "EqualTo" filter function.

The code we have wrritten given below. But its showing the filter menu. Please help.
Thanks in advance.

<telerik:GridTemplateColumn UniqueName="Column1" SortExpression="Column1" 
    HeaderStyle-ForeColor=
"#245E9E" HeaderText="Column 1" ItemStyle-Wrap="true" Resizable="true"
    AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" DataField="Column1"
    FilterImageUrl="_layouts/Images/CoreSystem.LayoutsApp/filter.png">
     <ItemTemplate>
         <asp:Label ID=
"LblColumn1" Text='<%#Eval("Column1")%>' runat="server"></asp:Label>
     </ItemTemplate>
     <HeaderStyle Width=
"280px" />
     <ItemStyle Font-Names=
"Arial" Font-Size="11px" Wrap="true" />
    </telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 16 Aug 2013, 06:07 AM
Hello,

When you set the AutoPostBackOnFilter property to true, as soon as you blur the filter input a postback applying the current filter function will be made. That is why you do not need to press any buttons.

You could hide the filter menu button by setting the ShowFilterIcon property to false.

On the other hand you could use the approach demonstrated in this online demo application to define filter template and thus to achieve your goal using different approach.

Regards,
Andrey
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 RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or