How to implement Custom Paging and sorting in webgrid using jquery

In this post, I am explain How to implement Custom Paging and sorting in webgrid using jquery.

In My previous posts I have explained How we can implement Custom Paging in webgrid in MVC4 application.


Here In this post I would like to explore How we can implement Custom Paging and sorting in webgrid using jquery. It is a very essential approach to use paging and sorting technique in applications where lot of data to be loaded from database asynchronously.

Webgrid
Customer ID Customer Name Address City Postal Code
1 2 3 >
7 Ana Trujillo Avda. de la Constitución 2222 México D.F. 98033
8 Antonio Moreno Mataderos 2312 México D.F. 98052
5 Benji Dutta 56 chouringi hill Dubai 1456
10 Hanna Moos Forsterstr. 57 Mannheim SW1 8JR
How to implement Custom Paging and sorting in webgrid using jquery
 
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - My ASP.NET MVC Application</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Home", "Index", "Home")</li>
                            <li>@Html.ActionLink("About", "About", "Home")</li>
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                        </ul>
                    </nav>
                </div>
            </div>
        </header>
        <div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
            </div>
        </footer>

        @Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)
    </body>
</html>




Posted By :