Solved

GridView Height

Posted on 2010-11-28
3
560 Views
Last Modified: 2012-05-10
I put GridView in div.

I set <div id="div1"  style="overflow:scroll; height:auto;">, the grid height is auto. But for a long grid list, I want to set limited display height. So I set <div id="div1"  style="overflow:scroll; height:200px;">, but it display 200px height even there's only one record.

Is there a easy way like maximum row to achive both purpose? Such as height limit for long list row and auto for short list row. How can I achieve this?

Thanks.
0
Comment
Question by:minglelinch
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
gingermoleman earned 500 total points
Comment Utility
Hi,

Do you mean limit the number records returned?
In the gridview its PageSize="4" if you were to only want 4 records.
probably wise to also have AllowPaging="True" in there so you can at least get to extra rows.

GMM
0
 
LVL 1

Author Comment

by:minglelinch
Comment Utility
Thank you. That's what I want.
0
 
LVL 5

Expert Comment

by:gingermoleman
Comment Utility
welcome.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

12 Experts available now in Live!

Get 1:1 Help Now