473,394 Members | 1,852 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,394 software developers and data experts.

Not solved, datagrid rowheight.

Thank you guys.
But what I meant is to automatically adjust the height of
rows in datagrid regardless of font.

For instance, the datasource of datagrid is attached to
several datagrid rows. One row holds text of 10
characters, and the text in another row is 320
characters, some other rows hold maybe 500 characters.
That is the length of text in each grid are different.

Suppose the width of datagrid column is fixed, no
expanding is allowed. How can I adjust the rowheight of
datagrid ?
Nov 20 '05 #1
3 4022
You need to define the tablestyle

Dim dgts As New DataGridTableStyle

dgts.PreferredRowHeight = 200

DataGrid1.TableStyles.Add(dgts)

"Tracey" <jo********@hotmail.com> wrote in message
news:66****************************@phx.gbl...
Thank you guys.
But what I meant is to automatically adjust the height of
rows in datagrid regardless of font.

For instance, the datasource of datagrid is attached to
several datagrid rows. One row holds text of 10
characters, and the text in another row is 320
characters, some other rows hold maybe 500 characters.
That is the length of text in each grid are different.

Suppose the width of datagrid column is fixed, no
expanding is allowed. How can I adjust the rowheight of
datagrid ?

Nov 20 '05 #2
Thanks, but this is not the best solution. For there are
many datarows having small number of characters like 10.
If I define the tablestyle.prefereedrowheight to be 200,
the grid will look kind of empty.
-----Original Message-----
You need to define the tablestyle

Dim dgts As New DataGridTableStyle

dgts.PreferredRowHeight = 200

DataGrid1.TableStyles.Add(dgts)

"Tracey" <jo********@hotmail.com> wrote in message
news:66****************************@phx.gbl...
Thank you guys.
But what I meant is to automatically adjust the height of rows in datagrid regardless of font.

For instance, the datasource of datagrid is attached to
several datagrid rows. One row holds text of 10
characters, and the text in another row is 320
characters, some other rows hold maybe 500 characters.
That is the length of text in each grid are different.

Suppose the width of datagrid column is fixed, no
expanding is allowed. How can I adjust the rowheight of
datagrid ?

.

Nov 20 '05 #3
Hello,

Ok OK, 200 is a bit over the top but thats just an example. I dont think you
can set individual rows.



"Tracey" <jo********@hotmail.com> wrote in message
news:03****************************@phx.gbl...
Thanks, but this is not the best solution. For there are
many datarows having small number of characters like 10.
If I define the tablestyle.prefereedrowheight to be 200,
the grid will look kind of empty.
-----Original Message-----
You need to define the tablestyle

Dim dgts As New DataGridTableStyle

dgts.PreferredRowHeight = 200

DataGrid1.TableStyles.Add(dgts)

"Tracey" <jo********@hotmail.com> wrote in message
news:66****************************@phx.gbl...
Thank you guys.
But what I meant is to automatically adjust the height of rows in datagrid regardless of font.

For instance, the datasource of datagrid is attached to
several datagrid rows. One row holds text of 10
characters, and the text in another row is 320
characters, some other rows hold maybe 500 characters.
That is the length of text in each grid are different.

Suppose the width of datagrid column is fixed, no
expanding is allowed. How can I adjust the rowheight of
datagrid ?

.

Nov 20 '05 #4

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

Similar topics

3
by: deko | last post by:
I can set the ColumnWidth property of a datasheet in VBA like this: Forms("frm0").Controls(strForm).Form.Controls(strCtl).ColumnWidth = intCw But when I try to set the RowHeight like this: ...
4
by: Luis Ferrao | last post by:
Comming from Windows Forms development, I never had problems with this issue before. What i'm trying to achieve is an iTunes like incremental search. For those who never used iTunes, it's...
5
by: I'm Home | last post by:
I've read a lot of suggestions including the "javascript:printWindow()" command ... what I want ... the entire datagrid in printed form using my css style. What I get the page displayed on my...
1
by: John D Suru | last post by:
How do I disable the ability to adjust the row height in a datagrid? I don't see any property that can be set to do this John Suru
5
by: Dennis | last post by:
I have a class that inherits from DataGrid. I can set the rowheights in a DataGrid by tappig into the "get_Datagridrows" method. However, this does not work for classes that inherit from...
1
by: thomprl | last post by:
I'm just starting to learn vb.net. I programmed a few years in VB6 but ..NET is totally different and frustrating. I have a very simple project that I have mostly working. I have a program...
3
by: Sharon | last post by:
I have a DataGrid that contains a few rows and column header. I wish to change the DataGrid height to be the exact height of the total height of the rows and column header, so that no gray area...
3
by: Fred Zuckerman | last post by:
I'm trying to size a subform control to display all of the records (thus eliminating the vertical scroll bar). I know that the CanGrow property is only for printing. My thought was to determine...
0
by: Winfried Wille | last post by:
Hallo, i have a wpf project using nt 3.5sp1 and the ctp from the datagrid(downloaded thewpftoolkit from codeplex.com), silverlight final downloads are installed to. Wpf datagrid ctp cell...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.