My apologies, I was a little to quick to answer.
In both .net 1.1 and 2.0 for windows forms, the datagrid and
datagridview, respectively both support the Height property inherited
from the Control class.
If you can't get it work that way, your best bet is place a panel
control on your form, then place your datagrid inside there with the
datagrids dockstyle set to fill. Then you can reesize the panel to
whatever you need, and the grid will follow suit.
Thansks...
Actually ...I mean is row height....sorry I didn't write clearly
if user would like 5 row and 4 cloumn....after click generate button..
the grid will come out also each cell have same height and width ( for
example : may be each cell height = 100 width = 200)
> My apologies, I was a little to quick to answer.
>
[quoted text clipped - 6 lines]
> datagrids dockstyle set to fill. Then you can reesize the panel to
> whatever you need, and the grid will follow suit.
ClayB - 12 Apr 2007 10:00 GMT
Programmatically setting rowheights in a Windows Forms DataGrid is not
simple as the proper methods and fields are not publicly exposed in
the DataGrid. Here is a FAQ entry that steps you through using
reflection to get at these necessary class members.
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q1075q
==========================
Clay Burch
Syncfusion, Inc.
ClayB - 12 Apr 2007 10:04 GMT
You can set all the rowheights to be the same fixed value by setting
DataGrid1.PreferredRowHeight = xxxx
The previous comment regarding using reflection to set row heights is
only applicable if you need to make the rowheights vary from row to
row programmatically.
====================
Clay Burch
Syncfusion, Inc.
Localbar - 13 Apr 2007 04:56 GMT
Clay
Thanks so much....
> You can set all the rowheights to be the same fixed value by setting
>
[quoted text clipped - 7 lines]
> Clay Burch
> Syncfusion, Inc.