programcsharp / griddly

Hybrid grid -- Razor/MVC AJAX/HTML5
http://griddly.com
MIT License
16 stars 10 forks source link

Support multiple grids on a page pointing to same URL/Action #123

Open mayur-ownerrez opened 4 months ago

mayur-ownerrez commented 4 months ago

If you add more than one grid on a page, which refers to the same Controller & Action name, then it was sharing the single cookie name & all the data like Filters/Sorts etc will be shared across both the grid. Since we are persisting the data in cookie, the same filter/sort may be applied to the grid on another page in application if they are pointing to same Controller/Action.

Eg.

Scenario 1: Page 1 -> Grid 1 -> Contoller: Home, Action: GetData Page 1 -> Grid 2 -> Contoller: Home, Action: GetData

Scenario 2: Page 1 -> Grid 1 -> Contoller: Home, Action: GetData Page 2 -> Grid 2 -> Contoller: Home, Action: GetData

We need a way to uniquely distinguish the grid on same or different page within application. Provide an option to pass GridIdentifier as param in request which will uniquely identify the grid.