Solved

GridView Height

Posted on 2010-11-28
3
568 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
ID: 34227443
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
ID: 34238865
Thank you. That's what I want.
0
 
LVL 5

Expert Comment

by:gingermoleman
ID: 34238887
welcome.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 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