I am working with MS Visual studio C#.net, .net framework 1.1.

Do you have an idea, how can I use the ListView (details display mode),
that it does similarly as an html table do?
Or there is a better container which would fit my needs?

What I need in the ListView is:

1. Above some subitems, a common header should appear
(above the actual column headers).

2. In some rows I don't have all details (texts for all subitems),
but instead I have a commentary, common for some subitems.
So, I would need a kind of "colspan" in a table.

I would be grateful for any help/
Jola

----------------------------------------------------
I want to obtain that (example):

<html>
<table border=1>
<tr>
<th colspan='2'>

</th>
<th colspan='3'>
Block 1
</th>

<th>

</th>
<th colspan='3'>
Block 2
</th>
</tr>
<tr>
<th>
Main item
</th>
<th>

</th>
<th>
Subitem 1
</th>
<th>
Subitem 2
</th>
<th>
Subitem 3
</th>

<th>

</th>
<th>
Subitem 11
</th>
<th>
Subitem 22
</th>
<th>
Subitem 33
</th>
</tr>
<tr>
<td>
First entry
</td>
<td>

</td>
<td>
1284
</td>
<td>
4352
</td>
<td>
3214
</td>

<td>

</td>
<td>
3421
</td>
<td>
2412
</td>
<td>
3421
</td>
</tr>

<tr>
<td>
Second entry
</td>
<td>

</td>
<td colspan='3'>
here comes the commentary
</td>

<td>

</td>
<td>
4536
</td>
<td>
9867
</td>
<td>
3910
</td>
</tr>

<tr>
<td>
Third entry
</td>
<td>

</td>
<td>
3424
</td>
<td>
3334
</td>
<td>
3214
</td>

<td>

</td>
<td colspan='3'>
here comes the commentary
</td>
</tr>
</table>
</html>

Re: Is "colspan" in ListView possible? by Carlos

Carlos
Fri Jun 17 03:48:03 CDT 2005

The listview does not provide that functionality, so you will have to use
owner-draw techniques or to use a 3rd party control.

Customizing a Control's Appearance Using Custom Draw
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/custdraw/custdraw.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Jola" <Jola@discussions.microsoft.com> escribió en el mensaje
news:110FDB7A-33FC-46FF-B9D1-0B6B8857A036@microsoft.com...
>I am working with MS Visual studio C#.net, .net framework 1.1.
>
> Do you have an idea, how can I use the ListView (details display mode),
> that it does similarly as an html table do?
> Or there is a better container which would fit my needs?
>
> What I need in the ListView is:
>
> 1. Above some subitems, a common header should appear
> (above the actual column headers).
>
> 2. In some rows I don't have all details (texts for all subitems),
> but instead I have a commentary, common for some subitems.
> So, I would need a kind of "colspan" in a table.
>
> I would be grateful for any help/
> Jola
>
> ----------------------------------------------------
> I want to obtain that (example):
>
> <html>
> <table border=1>
> <tr>
> <th colspan='2'>
>
> </th>
> <th colspan='3'>
> Block 1
> </th>
>
> <th>
>
> </th>
> <th colspan='3'>
> Block 2
> </th>
> </tr>
> <tr>
> <th>
> Main item
> </th>
> <th>
>
> </th>
> <th>
> Subitem 1
> </th>
> <th>
> Subitem 2
> </th>
> <th>
> Subitem 3
> </th>
>
> <th>
>
> </th>
> <th>
> Subitem 11
> </th>
> <th>
> Subitem 22
> </th>
> <th>
> Subitem 33
> </th>
> </tr>
> <tr>
> <td>
> First entry
> </td>
> <td>
>
> </td>
> <td>
> 1284
> </td>
> <td>
> 4352
> </td>
> <td>
> 3214
> </td>
>
> <td>
>
> </td>
> <td>
> 3421
> </td>
> <td>
> 2412
> </td>
> <td>
> 3421
> </td>
> </tr>
>
> <tr>
> <td>
> Second entry
> </td>
> <td>
>
> </td>
> <td colspan='3'>
> here comes the commentary
> </td>
>
> <td>
>
> </td>
> <td>
> 4536
> </td>
> <td>
> 9867
> </td>
> <td>
> 3910
> </td>
> </tr>
>
> <tr>
> <td>
> Third entry
> </td>
> <td>
>
> </td>
> <td>
> 3424
> </td>
> <td>
> 3334
> </td>
> <td>
> 3214
> </td>
>
> <td>
>
> </td>
> <td colspan='3'>
> here comes the commentary
> </td>
> </tr>
> </table>
> </html>



Re: Is "colspan" in ListView possible? by Jola

Jola
Fri Jun 17 04:23:02 CDT 2005

Thank you for your quick answer. I will try the link and give here a
feedback, how I implemented my table.

Jola

"Carlos J. Quintero [.NET MVP]" wrote:

> The listview does not provide that functionality, so you will have to use
> owner-draw techniques or to use a 3rd party control.
>
> Customizing a Control's Appearance Using Custom Draw
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/custdraw/custdraw.asp
>


Re: Is "colspan" in ListView possible? by Jola

Jola
Mon Jun 27 10:37:07 CDT 2005

This is to difficoult for me, to understand the custom draw. I would need any
example which could solve my problem. Do anybody know any example (in C#) for
my question?

Jola