Solved

Help with autosize of dataGridView

Posted on 2016-09-18
4
34 Views
Last Modified: 2016-09-19
Hi,

How do you adjust the height of  the DatagridView depending on the number of records using VB.NET?

Thanks,

Victor
0
Comment
Question by:vcharles
[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
4 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 41804148
Hi Victor;

I believe you can use DataGridView.RowCount to show that many rows.
0
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41804171
Put datagrid in a div or table and use height as 100%
0
 

Author Comment

by:vcharles
ID: 41804207
Hi Fernando,

It works with DataGridView.RowCount * 25

Thanks

Pawan Thanks for your comment.

Victor
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 41804582
Not a problem Victor, glad to help.
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

734 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