DataGrid and Form Autosize

torg

Regular
Joined
Nov 7, 2002
Messages
60
Location
Norway
I`ve got a form and a Datagrid. is there a method to expand the size of the datagrid so that I`ll be able to see all the rows from the select statement? The number of rows are not constant, so therefor I want the Datagrid to resize dependent of number of rows.? The DataGrid is initially not visible. When I push a button , I want the Datagrid to appear. If the size of the datagird varies , the size of the form has to be able to change size also dynamically. Any method for this?
 
I wouldn't bother with something like this, but if you really want....
you can put together a calculation to manage DataSet1.Tables(0).Rows.Count * n would be the datagrid height. Be careful not to exeed the forms' height.
 
Back
Top