How to disable Paging in WebGrid
Asked Answered
F

1

17

I've searched the documentation (http://msdn.microsoft.com/en-us/library/system.web.helpers.webgrid.webgrid(v=vs.111).aspx), and found "canPage: false" - which does not work. Saying there is no parameter named 'canPage'.

Other sites have said 'autoSortAndPage: false' works, but it hasn't worked for me.

Code:

<div id="grid">
    @grid.Html(canPage: false,
      // the rest of my grid stuff
    );
</div>

How can I get rid of this paging?

Forbear answered 23/9, 2012 at 6:18 Comment(0)
B
18

It's canPage, but that's a parameter of the WebGrid constructor.

@{
    var grid = new WebGrid(canPage: false,
      // ... etc
    );
}

<div id="grid">
    @grid.GetHtml()
</div>
Beatty answered 23/9, 2012 at 6:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.