I am simply trying to HIDE FILTERING when initialized. Then the user can choose to SHOW if he wishes.
this will not hide the filtering upon grid initialization:
$("#pfgrid").igGridFiltering("allowFiltering", false);
I've been researching this, but can't figure out how to hide filtering when igGrid is first displayed.
thanks.
Bob
You can do it with an event handler :
dataFiltering: function (evt, ui) { console.log('filtering -> dataFiltering');
$(".ui-iggrid-filterrow td").each(function () { var description = $(this).attr('aria-describedBy'); if (description.indexOf('transactionDate') > 0) { console.log('got transaction date!'); $(this).css('visibility', 'hidden'); } }); }
Yes, I want to turn off the whole filtering feature when first displayed.
This does not work: $("#pfgrid1").igGridFiltering("toggleFilterRowByFeatureChooser");
Am I missing another parameter ?
thanks for responding...
Hello Bob,
Are you talking about the whole Filtering feature or specific column?Grid features cannot be enabled/disabled dynamically. You have to re-create the grid in order to do that.However the grid Filtering feature has a method toggleFilterRowByFeatureChooser which hides the filter row i.e. works only for the simple filtering (mode: 'simple').Here is a sample code:$("#grid1").igGridFiltering("toggleFilterRowByFeatureChooser");
If you use the advanced filtering then you should re-create the grid.Hope this helps,Martin PavlovInfragistics, Inc.