Hi..
How to automatically Set height of datagridview based on number of rows in windows Forms using vb.net
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hemant SrivastavaPosted Nov 14, 2012, 4:06 PM
Thanks,
Hemant
Hemant SrivastavaPosted Nov 14, 2012, 4:05 PM
Suppose you are binding a list/DataTable (or any IEnumerable object) into your dataGridView
For example you have data table "dt", firstly get its Rows count
then calculate height of DataGridView dynamically: