How to set DataGridView row height?

J

Jyrki

Hello,

I have a small problem in regards to DataGridView component.

I would like to know how to set row heights in a DataGridView.
Sofar, I have used command:

DataGridView1.AutoSizeRows(DataGridViewAutoSizeRowsMode.HeaderAndColumnsAllRows)

(source MSDN artice: Introducing a New Data Grid, MacDonald)

The above works nicely as long as the column widths are set properly.
My ideal row height would be two rows of visible text in certain
column. Therefore, I was wondering whether there is a way to do that
same by assigning a fixed number to a row height property in
DataGridView? By doing that I would avoid using the code above.

Best Regards

Jyrki Mizaras
Software Developer
 

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