Persisting Filter, Its a question on how to.

Nov 28, 2013 at 4:51 PM
Hi,

I have the grid working on click of Edit want to persist the filter so that when the user presses return to list view then the filter is still there. how can i do it.

is there a method called PersistFilterForSessionForGridID("#UserList");

i saw that you made some thing with QryString, http://gridmvc.azurewebsites.net/?grid-filter=Customer.IsVip__1__false&grid-column=Customer.IsVip&grid-dir=1&grid-page=3


how do i get it to next page and bring it back?


Kind Regards
Vinay.


List screen
 columns.Add()
                    .Encoded(false)
                    .Sanitized(false)
                    .SetWidth(30)
                    .Css("hidden-xs") //hide on phones
                    .RenderValueAs(o =>
                        @<span>
                            <a rel="tooltip" href="@Url.Action("Edit", "User",new { userName = o.Username })" class="modal_link" data-id="@o.Username">
                            <i class="fa fa-pencil fa-lg" data-original-title="Edit User" data-toggle="tooltip" data-placement="bottom" style="color:#326C8A"></i></a>
                        </span>);
in the edit screen
    <div class="form-group">
                <div class="col-lg-10 col-lg-offset-2">
                    <button class="btn btn-primary" type="submit">Submit</button>
                    <a  href="@Url.Action("Index", "User")"  title="Back to list" data-placement="bottom" class="btn btn-default"><i class="fa fa-list"></i>Back to List </a>
                </div>
            </div>
Coordinator
Dec 3, 2013 at 1:57 AM
Hi,
You can persist filter settings in the session, please see https://gridmvc.codeplex.com/discussions/465397