asp.net mvc - MVC Webgrid Efficient Paging -


i have webgrid in partial view , rending partial view in index.cshtml through controller action.

on pageindex change, want pass page index number controller action. using procedure take records table.so when pass page number , page size fewer records load efficient paging can done. question how pass page index number on page change event. binding webgrid on load

 $.ajax({         url: "/alerts/bindusermessagelist",         type: "get",         async: false,         cache: false,         datatype: "json",         success: function (data) {             // alert(data);             $("#divmessagepartial").html(data);         },         error: function (error) {             debugger;           }     }); 

on page index change how call controller action page index property in mvc?

 create procedure skiptake   @pagno int,      @pagesize int select *     (select *, row_number() on (order [m_messageid]) rn            [dbo].[ts_user_messages]           ) t     t.rn between (@pagno - 1) * @pagesize + 1 , @pagno * @pagesize 

pls answer above scenario.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -