This is a migrated thread and some comments may be shown as answers.

Problem with paging

1 Answer 56 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Steve asked on 25 Sep 2012, 03:53 PM
I have a grid that is not paging correctly.  When I click on next page nothing happens.

Here is my code.


<!DOCTYPE html>
<html lang="en">
        <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" />



             <div id="logindisplay">
                    Hello, @User.Identity.Name!
                    <ul id="menu">
                        <li>@Html.ActionLink("Home", "Index", "Home")</li>
        <div id="body">

            <section class="content-wrapper main-content clear-fix">


@model IEnumerable<Benchmarks.Models.Benchmark>

<script src="~/Scripts/kendo/2012.2.710/kendo.pager.min.js"></script>

@(Html.Kendo().Grid(Model)            //The grid will be bound to the Model which is the Products table
      .Name("productGrid") //The name of the grid is mandatory. It specifies the "id" attribute of the widget.
      .Columns(columns =>
          columns.Bound(p => p.HydrantNumber);
          columns.Bound(p => p.Street1);
          columns.Bound(p => p.Street2);
          columns.Bound(p => p.Location); 
          columns.Bound(p => p.Quadrant);
          columns.Bound(p => p.Description);
          columns.Bound(p => p.Elevation);
          columns.Bound(p => p.OrderNumber);
          columns.Bound(p => p.RevisionMonth);
          columns.Bound(p => p.RevisionYear);
          columns.Bound(p => p.Remark);
          columns.Command(command => { command.Edit(); command.Destroy(); }).Width(200);

     .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable(pageable => pageable.PageSizes(true).PageSizes(new int[] {15,20,25}))
    .DataSource(dataSource => dataSource        
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.Id))
        .Create(update => update.Action("EditingInline_Create", "Grid"))
        .Read(read => read.Action("EditingInline_Read", "Grid"))
        .Update(update => update.Action("EditingInline_Update", "Grid"))
        .Destroy(update => update.Action("EditingInline_Destroy", "Grid"))

1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 27 Sep 2012, 08:40 PM
Ok so how come my pager looks like this??  I understand nobody wants to help but im still having issues with the mvc grid.
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question