Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

how do I get the DataGrid to display maximized?

I have a DataGrid in a windows form.
I read in some data from a SQLServer DB and set the DataGrid's DataSource property correctly.
When it displays in the form, I have to hit the + sign to maximize it.

How can I disply the DataGrid maximized by default?

Friday, December 27, 2002

I think you mean "expanded" rather than "maximised" -- in that case, set the DataSource to the DataTable in the DataSet tather than the DataSet itself, i.e.:
  myDataGrid.DataSource = myDataSet.Tables[0];
...or similar.


Duncan Smart
Thursday, January 9, 2003

*  Recent Topics

*  Fog Creek Home