473,383 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Control Datagrid height in vs2003

hi all,

my problem is...i have 2 textbox for user input no. of row and no.of
column. After user input, the datagrid will show what user input....for
example: user input 5 rows and 6 column. After that...the datagrid will
show.I would like to control the height for datagrid after generate... but i
only can control the width....any one have idea about this.

Thanks
Apr 12 '07 #1
7 3225
On Apr 11, 9:45 pm, "Localbar" <localbar...@gmail.comwrote:
hi all,

my problem is...i have 2 textbox for user input no. of row and no.of
column. After user input, the datagrid will show what user input....for
example: user input 5 rows and 6 column. After that...the datagrid will
show.I would like to control the height for datagrid after generate... but i
only can control the width....any one have idea about this.

Thanks
Check out Datagrid Girl's website, she always has something good to
say...

http://weblogs.asp.net/datagridgirl/.../11/71475.aspx
Apr 12 '07 #2
thx first....actually my program is vb.net....not asp.net
um...difficult to do

"Charlie Brown" <cb****@duclaw.com???
news:11**********************@n76g2000hsh.googlegr oups.com ???...
On Apr 11, 9:45 pm, "Localbar" <localbar...@gmail.comwrote:
hi all,

my problem is...i have 2 textbox for user input no. of row and no.of
column. After user input, the datagrid will show what user input....for
example: user input 5 rows and 6 column. After that...the datagrid will
show.I would like to control the height for datagrid after generate...
but i
only can control the width....any one have idea about this.

Thanks

Check out Datagrid Girl's website, she always has something good to
say...

http://weblogs.asp.net/datagridgirl/.../11/71475.aspx


Apr 12 '07 #3
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.

Apr 12 '07 #4
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)

"Charlie Brown" <cb****@duclaw.com???
news:11**********************@y80g2000hsf.googlegr oups.com ???...
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 panelI didn't
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.

Apr 12 '07 #5
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/Window...4c.aspx#q1075q

==========================
Clay Burch
Syncfusion, Inc.

Apr 12 '07 #6
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.

Apr 12 '07 #7
Clay
Thanks so much....
"ClayB" <cl***@syncfusion.com???
news:11**********************@p77g2000hsh.googlegr oups.com ???...
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.

Apr 13 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3"...
2
by: Carlo Marchesoni | last post by:
I have a very basic question using the DataGrid. What I want to achieve is controlling the size of it (specially the height of the rows). The DataGrid adjusts the row size according to the amount...
2
by: tshad | last post by:
This is related to my other Hiding datalistitems problem that I can't seem to solve. I have tried different methods which all seem to work only partially. I decided to try to use a User...
3
by: Tor Inge Rislaa | last post by:
Hi, I have a need of controlling the row height of the individual rows in a data grid. The row height will be adjusted after the datagrid is filed with data and the height will be different for...
0
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
0
by: billmiami2 | last post by:
I have a machine (XP PRO x64) with both the .NET 2.0 (v2.0.50727) and 1.1 (v1.1.4322) frameworks installed. I have both VS2005 and VS2003 running. I'm using Dennis Bauer's ASP.NET version...
15
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
1
by: Paul | last post by:
is the gridview control in vs2005 the same as the datagrid in vs2003 or is there a datagrid control in 2005 called datagrid? thanks. -- Paul G Software engineer.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.