Datagridview - adjusting individual row heights for multi-line text field

I am trying to duplicate the capabilities of the Quickbooks invoice entry form where the user has the ability to add multiple lines in the item description field and each of the other fields in the grid adjust size-wise accordingly.

I'm at my wits end as far as trying to figure it out and maybe it can't be done with the standard datagridview as opposed to a custom datagridview.

Any words of wisdom or direction to move me in the right direction.  This affects about 5-6 critical accounting forms I am to work with.

Phil Tate
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne Taylor (webtubbs)Commented:
Set the columns DefaultCellStyle.WrapMode property to True, then use code like this to resize the row...

    Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
        If e.RowIndex >= 0 Then
        End If
    End Sub

TSFLLCAuthor Commented:

The gridview is not editable.  I have a button that opens another form where the item_description field can be edited with multiple lines.  I did modify the WrapMode = True on the gridview and incorporated the AutoResizeRow upon completion of add/edit of the no avail.  It's not making any change to the row as far as the resizing.  When I hover the cell, I do see that there are 3-4 lines in the cell but the row does not change where it displays the complete field value in the cell.

What gives?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TSFLLCAuthor Commented:
Sorry for the delay guys.  I'll be looking at closing this soon.
TSFLLCAuthor Commented:
This issue as a whole is very difficult for me, but the MSDN document provides the tools to accomplish.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.