Click to See Complete Forum and Search --> : How to Display 2 lines of text in ListView Item


Donovan
January 26th, 2003, 09:43 AM
Hi All,

Is there a way to display two lines/rows of text within a single ListView Item? I have searched the web, newsgroups and MSDN to no avail. To get around this I have kludged together a composite control (using a panel, 2 rows of labels, and a picturebox) that simulates a two-line row of data. However, now that I have resolved *this* issue, I find that my challenge has morphed into building a scrollable container into which this composite control can be embedded. So, before I pour more effort into this approach, I thought I should at least ask if there is a way to do this directly, or indirectly, with a ListView. BTW, I need to do this with the .NET Compact Framework, but any thoughts are appreciated. Thx.

pareshgh
January 26th, 2003, 10:47 PM
i don't think in listview this is possible directly, so you need to trick out the GUI part as you are doing something right now.

Paresh

pareshgh
January 26th, 2003, 10:49 PM
forgot to mention that instead of listview you could use datagrid so that it could help you in all purposes that you want. you could overload the class when its editting mode. there are samples in MSDN check out.

paresh

Donovan
January 27th, 2003, 07:05 AM
Thanks Paresh. I will check out the datagrid - if the individual cells can contain and display objects other than text, then maybe I could insert my composite control (panel with picbox, labels, etc.). This would accomplish what I am trying to do. I'll post the result of my inquiry.

pareshgh
February 6th, 2003, 06:38 PM
did you got the solution or still doing. Datagrid should be usefull to u.

if u want i can send samples to u..


Paresh

Donovan
February 9th, 2003, 01:32 PM
Paresh, I checked into using the Grid control. What I found is that in the .NET Compact framework, the grid elements can only contain text, so this appears to preclude the Grid control for my application. I may be wrong in my conclusion though, so I would appreciate any code samples or additional thoughts you might have on the subject. Thx for the help.

Donovan.

pareshgh
February 10th, 2003, 10:51 AM
I have not tested DataGrid on Compact framework of .NET but however if you wish to explore more then you could try overriding DataGrid etc.. here is the website like that will help you in that case

DataGrid Link (http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q895q)

thanx
Paresh