Method Community

 

Grid: Get View Filter

Last post 09-04-2012 11:19 AM by Anonymous. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-31-2012 5:37 PM

    • Dave
    • Top 500 Contributor
    • Joined on 11-17-2011
    • Posts 11

    Grid: Get View Filter

    The action in Grids, Set View Filter can set the filter, but I need to verify which filter is being used prior to executing some code.  How can you detirmine which filter is currently active on a grid?  Could this be added to Get Value from Screen?

    Thanks.

  • 09-04-2012 11:19 AM In reply to

    Re: Grid: Get View Filter

    Answer

    Dave:
    How can you detirmine which filter is currently active on a grid?

    This information isn't stored in a session so there would be no way to determine which filter you're on.  I've submitted a suggestion to the team here to add this information to the Get Value From Screen but I can't tell you when or if this feature will be added.

    If you wanted to build a workaround you could replace the filter drop down on a grid with a button somewhere else on the page and assign the filter changes to an Action Result on change.  Using your own custom filter view switcher you could then write the filter name to an Action Result every time it changes.  This way you would know what the current filter.  You'd also need to add an onScreenLoad action to write the default filter name into the Action Result to start.  This is the only work around I can think of to acheive what you're looking for.  The problem with this solution is that the filter by view drop down would still show in the grid so if someone used that instead of your button then your Action Result wouldn't populate.

    ~C

Page 1 of 1 (2 items)