473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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 5042
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: timtos | last post by:
I just started to create my own ListView control and already have big problems... I use the following code at the moment: protected override void OnPaint(PaintEventArgs pe) {...
2
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add...
2
by: Brian S | last post by:
I have a custom listView that works fine. There are items that are colored red to notify the user that there is a problem. However, if you select one of the red items, then select space below any...
8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
0
by: sorpor | last post by:
I am trying to create a custom listviewsorter by implementing IComparer. My listview has check boxes and the purpose is to move checked item to top of list. They all will be sorted ascendingly. It...
5
by: ToddH | last post by:
I know the following code is C#. I'm a vb programmer trying to learn a new language. I posted this in the c# group but never got a response. You guys seem to know alot about all languages and have...
0
by: Piotr Strycharz | last post by:
Hi, I need to develop a custom control. The control is going to be something like Properties window in VS - listview (grid?) with resizable columns and collapsable sections. The control needs...
12
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. ...
1
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
I'm running VS2008 & attempting to solve a problem I've encountered while developing some software for our business. Here's the basic idea...I've created a class that represents a file (with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.