Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7761921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:15:33+00:00 2026-06-01T14:15:33+00:00

I am using the Webgrid in asp.net mvc3, and using it’s build in paging

  • 0

I am using the Webgrid in asp.net mvc3, and using it’s build in paging and sorting.

@{
    var grid = new WebGrid(rowsPerPage: 10, ajaxUpdateContainerId: "GridDiv");
    grid.Bind(source: Model);
    grid.Pager(WebGridPagerModes.All);
}

The paging in the bottom shows something like this to switch between pages

1 2 3 4 5 >

When there is less then 10 rows in the model, there is only one page and the paging in the bottom disappear.

is there a way to make it show even if there is only one page?

1 >

Hope I was clear.
Thanks a lot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:15:34+00:00Added an answer on June 1, 2026 at 2:15 pm

    One quick fix would be to check the TotalRowCount and manually add links,

    @{
    var grid = new WebGrid(rowsPerPage: 10, ajaxUpdateContainerId: "GridDiv");
    grid.Bind(source: Model);
    grid.Pager(WebGridPagerModes.All);
    
    if(grid.TotalRowCount <= 10)
    {
    <a href="#">1</a>
    <a href="#">></a>
    }
    }
    

    this definitely is not a correct way to do so, also what are you planning to do on clicks on such links? are they just empty links then this is for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had created a webpage using asp.net mvc3 razor. I have two master pages
I Have a little problem with WebGrid control for Asp.Net MVC3. What I want
I am new to ASP.NET MVC3 and trying desperately to just get something simple
Using an asp.net mvc webgrid, is it possible to render a column using Html.DisplayFor
I have the following WebGrid in my ASP.NET MVC3 test application. It displays a
I am using this webgrid in my view. <div class=grid> @{ var grid =
I've been developing an asp.net mvc 3 application and I'm using webgrid to show
I am relatively new at using ASP.NET MVC, however I have got experience with
I'm using asp.net webGrid in which i have two buttons which both open same
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.