Restricting the Number of Rows Per Page in GridView

Posted on 2006-04-21
Last Modified: 2011-09-20

I have a GridView control in VS.Net 2.0 for which I have paging enabled.  I'd like to list details for each record below.  Is there a way to restrict the number of records displayed per page so that when the control is rendered it only takes up about 25% of the screen leaving the rest of the space avilable for the details?

Question by:FoxProMari
    LVL 23

    Expert Comment

    You can always set the height of the control to 25% provided your page is set to 100% height.
    LVL 24

    Accepted Solution

    You should be able to set the PageSize property of the GridView to set it to a specific number of rows.

    gridView.PageSize = 10 or whatever you want.


    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now