Solved

GridView Height

Posted on 2010-11-28
3
572 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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