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

Dynamically hiding grid filter row

3 Answers 947 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 27 May 2015, 03:28 PM
Is there a way to dynamically hide/display the kendo ui grid through javascript?

3 Answers, 1 is accepted

Sort by
0
Tony
Top achievements
Rank 1
answered on 27 May 2015, 08:18 PM
Sorry. I meant to say the filter row of the grid.
0
EZ
Top achievements
Rank 2
answered on 27 May 2015, 08:55 PM

The filter row is assigned a class of .k-filter-row, so you could just use script to select the row and hide/show it:

 $("#gridid .k-filter-row").hide(); /  $("#gridid .k-filter-row").show();

 If you want to actually turn filtering on and off using grid options: 

      var grid = $("#gridid").data("kendoGrid");

       grid.setOptions({
          filterable: false
        });

 

        grid.setOptions({
          filterable: {
                mode: "row"
            }
        });

DEMO

0
Tony
Top achievements
Rank 1
answered on 27 May 2015, 09:08 PM
Perfect. Thank You.
Tags
Grid
Asked by
Tony
Top achievements
Rank 1
Answers by
Tony
Top achievements
Rank 1
EZ
Top achievements
Rank 2
Share this question
or