1

I have a strange problem. I am trying to perform custom pagination in MVC using jquery. I am doing so by putting my grid in partial view of the parent page. When I update the view after the first time load, my model values are not getting updated on consecutive calls. Can someone please advise?

brimborium
  • 9,362
  • 9
  • 48
  • 76
Harsh
  • 11
  • 1

3 Answers3

1

I think You need to refer this post. This could be linked to your problem as well.

Disable caching on a partial view in MVC 3

Community
  • 1
  • 1
Swati Gupta
  • 546
  • 3
  • 8
0

It could be a caching problem, try to disable it by putting this attribute on your Controller:

[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]

Disable caching for all ajax calls in javascript:

$.ajaxSetup({ cache: false });
Stefan P.
  • 9,489
  • 6
  • 29
  • 43
0

I will seize upon the term grid. I assume you have constructed some sort of grid using html/razor/javascript etc. Then you placed it in a partial view. Now you want that grid to refresh after you do an update.

I have provided a comprehensive solution to the problem of displaying data in grid format using ASP.NET MVC 3 and the jQuery-UI plugin jqGrid.

ASP.Net MVC 3 JQGrid

The solution is ajax based and provides full CRUD functionality. You can convert the grid into a read-only grid if needed. I have not had any issues with model values not being updated.

Community
  • 1
  • 1
wayne.blackmon
  • 714
  • 13
  • 24