2

I'm really new to asp.net and Telerik...

I have a RadGrid with filtering. I set AutoPostBackOnFilter="true" and CurrentFilterFunction="Contains" on my columns. Ok it works fine, user don't have to open drop-down list to select type of filter. But now, I want to hide filter buttons.

Possible ?

Thank you !

Olof
  • 524
  • 5
  • 20

2 Answers2

2

You can use this :

        <script type="text/javascript">
            function showFilterItem(){
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
            }
            function hideFilterItem(){
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
            }
        </script>

If you want to know more about Telerik Grids in ASP.Net, looak at the demos, there you can see samples of code : http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx

LaGrandMere
  • 10,265
  • 1
  • 33
  • 41
  • 1
    I know the demos, but I don't look there for this question... So I add ShowFilterIcon="false" on my columns and it works fine ! I don't find this option on the documentation (http://www.telerik.com/help/aspnet-ajax/grdbasicfiltering.html)... Thank you ! – Olof Jan 14 '11 at 12:12
0

You can call .Filterable(false) on the column definition.

@{ Html.Telerik().Grid(Model)
        .Name("Grid")
        .DataKeys(keys => keys.Add(m => m.ID))
        .Columns(columns =>
        {
            columns.Bound(m => m.Name).Filterable(false);
            columns.Bound(m => m.Category).Filterable(false);
        }
}
Vasile Tomoiaga
  • 1,727
  • 3
  • 16
  • 19