469,909 Members | 1,758 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

creating a custom listview item

Can anyone point me in the direction of creating a custom listview item? I
guess the other question then - is this possible? I want to create a list of
listview items comprised each comprised of text and a set of textboxes.
May 18 '07 #1
7 4782
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"brainfuelmedia" <br************@discussions.microsoft.comwrote in message
news:7C**********************************@microsof t.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.

May 18 '07 #2
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"brainfuelmedia" <brainfuelme...@discussions.microsoft.comwrote in message

news:7C**********************************@microsof t.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,

Why not using DataGrid?

Moty

May 18 '07 #3
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Moty Michaely" <Mo*****@gmail.comwrote in message
news:11*********************@l77g2000hsb.googlegro ups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> This is going to be pretty hard to do. Windows Controls do not
natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation,
as
it would provide what you need much more easily.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"brainfuelmedia" <brainfuelme...@discussions.microsoft.comwrote in
message

news:7C**********************************@microso ft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.

Hi,

Why not using DataGrid?

Moty

May 18 '07 #4
On May 18, 11:45 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"Moty Michaely" <Moty...@gmail.comwrote in message

news:11*********************@l77g2000hsb.googlegro ups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
This is going to be pretty hard to do. Windows Controls do not
natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.
If you are able to, take a look at Windows Presentation Foundation,
as
it would provide what you need much more easily.
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
"brainfuelmedia" <brainfuelme...@discussions.microsoft.comwrote in
message
>news:7C**********************************@microso ft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,
Why not using DataGrid?
Moty
Nich (hope I can call you nich),

you are absolutely right, there are many differences (conceptually and
visually), but if the needs are editable cells and UI Providers, maybe
the OP should reconsider using listview (by it's current
features...).
As in my opinion, the cost of owner drawing the list items climbs the
usefulness.

Moty

May 18 '07 #5
Nicholas Paldino [.NET/C# MVP] wrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.
"brainfuelmedia" <br************@discussions.microsoft.comwrote in message news:7C**********************************@microsof t.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.
You might check out the following codeproject control:

http://www.codeproject.com/cs/miscctrl/aa_listview.asp

This is a listview-like control (it does NOT inherit from .Net listview) which
has the hooks you need to embed a custom control into the list items of a given
column. I have used it, it works. Comes with source and some examples. It may
be that you can do the same with the 2.0 DataGridView as others have suggested .
.. . not sure about the custom control part, though.
HTH,
-rick-
May 19 '07 #6
Thanks, Rick. I've dowloaded the files and will see if this fits in to what
I'm trying to accomplish.

"Rick Lones" wrote:
Nicholas Paldino [.NET/C# MVP] wrote:
This is going to be pretty hard to do. Windows Controls do not natively
support composition, so you would have to handle all the
repainting/positioning/etc, etc, yourself.

If you are able to, take a look at Windows Presentation Foundation, as
it would provide what you need much more easily.
"brainfuelmedia" <br************@discussions.microsoft.comwrote in message news:7C**********************************@microsof t.com...
Can anyone point me in the direction of creating a custom listview item?
I
guess the other question then - is this possible? I want to create a list
of
listview items comprised each comprised of text and a set of textboxes.

You might check out the following codeproject control:

http://www.codeproject.com/cs/miscctrl/aa_listview.asp

This is a listview-like control (it does NOT inherit from .Net listview) which
has the hooks you need to embed a custom control into the list items of a given
column. I have used it, it works. Comes with source and some examples. It may
be that you can do the same with the 2.0 DataGridView as others have suggested .
.. . not sure about the custom control part, though.
HTH,
-rick-
May 22 '07 #7
Thanks for you help. I'll do a little research in to implementing this in to
a datagrid.

"Moty Michaely" wrote:
On May 18, 11:45 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Well, one could use a datagrid. They are different things,
conceptually, but if it suits the OP's needs, then by all means, it would
work.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"Moty Michaely" <Moty...@gmail.comwrote in message

news:11*********************@l77g2000hsb.googlegro ups.com...
On May 18, 10:04 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> This is going to be pretty hard to do. Windows Controls do not
>natively
>support composition, so you would have to handle all the
>repainting/positioning/etc, etc, yourself.
> If you are able to, take a look at Windows Presentation Foundation,
>as
>it would provide what you need much more easily.
>--
> - Nicholas Paldino [.NET/C# MVP]
> - m...@spam.guard.caspershouse.com
>"brainfuelmedia" <brainfuelme...@discussions.microsoft.comwrote in
>message
>>news:7C**********************************@micros oft.com...
Can anyone point me in the direction of creating a custom listview
item?
I
guess the other question then - is this possible? I want to create a
list
of
listview items comprised each comprised of text and a set of textboxes.
Hi,
Why not using DataGrid?
Moty

Nich (hope I can call you nich),

you are absolutely right, there are many differences (conceptually and
visually), but if the needs are editable cells and UI Providers, maybe
the OP should reconsider using listview (by it's current
features...).
As in my opinion, the cost of owner drawing the list items climbs the
usefulness.

Moty

May 22 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by timtos | last post: by
2 posts views Thread by Anushya devi | last post: by
5 posts views Thread by ToddH | last post: by
reply views Thread by Piotr Strycharz | last post: by
12 posts views Thread by garyusenet | last post: by
1 post views Thread by =?Utf-8?B?Q2hhcmxlcw==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.