Skip to main content
RSS feed Subscribe to feed

 

Adding a Filtering Scheme

The filtering scheme collection is synchronized with the data manager's filtering selection collection. Filtering schemes are added by adding a filtering selection.

document.Transactions.ExecuteTransaction(delegate
{
    // Add a new data filtering selection.
    DataFilteringSelection dataFilteringSelection = document.Data.Filterings.Add("My Filtering");

    // A filtering scheme has now been implicitly added for the new data filtering selection.
    FilteringScheme myFilteringScheme = document.FilteringSchemes[dataFilteringSelection];

    // Let the active page use the new filtering scheme.
    document.ActivePageReference.FilterPanel.FilteringSchemeReference = myFilteringScheme;

    // Make sure that the filter panel shows the filtering scheme menu.
    document.FilteringSchemes.FilteringSchemeMenuVisible = true;
});