Solved

GridView Height

Posted on 2010-11-28
3
565 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding  DYMO Labelprinter to c# client application 4 30
Moving code from one TFS branch to another 3 25
InputLanguage 1 25
Problem!!! 8 33
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
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…

776 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