Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Line Grid Row 1

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I'm pretty sure this type of question has come up before, but I can't seem to find a good answer. I would like to have a grid that would display multiple lines per record and be able to edit the fields. All of the fields for each person are in one record.

Woule like this displayed:
---------------------------
Deliver To: Bill Jones
123 Mockingbird Lane
Newark, NJ
---------------------------
Deliver To: Fred Flintstone
456 Cobblestone Road
Bedrock, CA
---------------------------

Instead of this:

Deliver To Address
--------------- ---------------------------------
Bill Jones 123 Mockingbird Lane Newark, NJ
--------------- ---------------------------------
Fred Flintstone 456 Cobblestone Road Bedrock, CA
--------------- ---------------------------------

I've seen a few third party grids that might have this functionality. I was just wondering if this was possible with the standard data grid or data grid view, etc.?


Auguy
Sylvania/Toledo Ohio
 
The standard grid acts just like a database where the associated values (detail lines/records) are displayed horizontally, not vertically. If I am mistaken then I have not seen this functionallity used.



If at first you don't succeed, then sky diving wasn't meant for you!
 
May be a listview in the detailsview with grouping can be used. Still you have to open the record to edit
a workaround with datagridview is setting the value including VbCrlf
Code:
        With Me.DataGridView1
            .RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True
            .AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
            .Rows(0).Cells(0).Value = "Value 1" & vbCrLf & "Value 2" & vbCrLf & "Value 3"
        End With
Still editing is a problem.



Zameer Abdulla
 
Thanks Zameer, I will look into the listview and see if that will work for me. I'm also playing around with fixed sized panels with the fields I need inside of another panel that will have scroll bars. I think I can make this work (for me and the user) because the maximum number of fixed panels will be about 10. I'm not too worried about the editing part. If I have too I can popup another form to allow the user to edit the fields.

Auguy
Sylvania/Toledo Ohio
 
Thanks, After looking at the control I think this is exactly what I was looking for. Feeling a little bit embarrassed I didn't know much about this control.

Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top