Solved

Help with autosize of dataGridView

Posted on 2016-09-18
4
33 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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