Row in listview or datagrid span multiple columns?

B

Bob Dankert

I need to have an item in some sort of list, either listview or datagrid,
that would span multiple columns. Say I have 5 columns, each 100px wide. I
want to make one of the rows one column 500px wide instead of the standard 5
columns 100px wide.

I need to specify/seperate categories in a list of items, and I need section
headers which I would like to create with this method.

Is this possible? (I do not know datagrids well, but know it is not
possible in listview without painting it myself, or waiting for 2.0)

Thanks!

Bob Dankert
 
J

Jeffrey Tan[MSFT]

Hi Bob,

Based on my understanding, you want to make one cell of DataGrid have
different width with the column.
==============================
Normally, Winform DataGrid control one cell's style should be the same with
its column. We can set one column's width 5 times over other columns, but
any cell item in that column can not be different from that column.

DataGrid is a complex and highly encapsulated control, which does allow
your easy owner-draw re-writing. Because DataGrid does a lot of its
processing in the paint event, and some of the under-the-covers. This is
proved by Scott Berry, Software Design Engineer/Tester on the Windows Forms
team from the below link:
"Q: Can I owner-draw the datagrid in an easy way"
http://msdn.microsoft.com/chats/vstudio/vstudio_120302.asp

Also, .Net Framework did not add function support for ListView Owner-draw.

==========================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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