How to control row height in datagrid

T

Tor Inge Rislaa

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 each row. How do I loop trough the
rows and set the row height.

TIRislaa
 
K

Ken Tucker [MVP]

Hi,

I would recommend that you do not set each row a different height.
Each time you sort or add a new record the datagrid goes back to the default
row height and it will not let change it back. I would set the set the
preferredrowheight to the new height and manually set all the columns to the
new height. Here is a link to a sample I wrote. Take a look at the multiline
column.

http://www.onteorasoftware.com/downloads/coloredcolumns.zip

Ken
-------------------------
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 each row. How do I loop trough the
rows and set the row height.

TIRislaa
 
T

Tor Inge Rislaa

Hi couldn't open the project. It might be because it is developed in a newer
version of .Net (I am at 2002). Anyway I just need a simple solution to run
trough my rows. The grid will never be of more than 10 rows so a simple run
trough wouldn't be a problem. When the datagrid is filled with data the user
will not sort it.

TIRislaa
 
K

Ken Tucker [MVP]

Hi,

Here is a free utility to convert vs.net 2003 to vs.net 2002 format
http://www.codeproject.com/macro/vsconvert.asp


Ken
---------------------
Hi couldn't open the project. It might be because it is developed in a newer
version of .Net (I am at 2002). Anyway I just need a simple solution to run
trough my rows. The grid will never be of more than 10 rows so a simple run
trough wouldn't be a problem. When the datagrid is filled with data the user
will not sort it.

TIRislaa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top