473,398 Members | 2,393 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,398 software developers and data experts.

.Net Listview Woes

Is it me, or does it seem like they put no effort into creating the
listview control in .Net.
>From what i can see, it is actually LESS powerful than the vb6
listview.

A few gripes I have with .Net listview that aren't present in vb6:

-Inability to set tooltiptext of subitems (without the use of a very
inconveniant work around).
-Inability to display images in subitems (without using the windows api
to get the extended listview.... I'm in .NET!!!!... why do i have to
use windows API for something so easily done in vb6!?!)
-Loading large listviews takes MUCH longer in .NET than it does in vb6.
Therefore I have no chioce but to use virtualmode.

But virtual listviews have their own set of problems:
-Can't use extended listview to assign images to subitems when in
virtual mode (or at least I haven't figured out how).
-Suppose I have a listviewitem selected on a very large listview.
Something changes and I need to refresh the listview, but i immediately
want to re-select that same item. When not in virtual mode, this is
very simple... but when in virtual mode, how do you do this? I have
this crazy workaround to do it, but it is by no means a quality
solution.

Lets also not forget what i pain it is now to sort a column compared to
what it used to be.

If anyone has any suggestions, explanations of why the .net listview
blows so much, links to good articles, or 3rd party listviews that
address these issues, I would be very interested in some feedback.

Thanks,
Mike

Nov 2 '06 #1
3 2375
Everything the Win32 listview can do, the .NET ListView can do, thay just
didn't expose the finctionality in the .NET wrapper. You can override the
control and add to the WndProc and create properties that send messages to
the underlying control. I did a fully custom drawn listview in this manner a
while back. I'll see if I can drag up some code to get you started. It'll
have to be at the weekend because I'm mobile at the moment and don't have my
library of projects with me.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<Mi************@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Is it me, or does it seem like they put no effort into creating the
listview control in .Net.
>>From what i can see, it is actually LESS powerful than the vb6
listview.

A few gripes I have with .Net listview that aren't present in vb6:

-Inability to set tooltiptext of subitems (without the use of a very
inconveniant work around).
-Inability to display images in subitems (without using the windows api
to get the extended listview.... I'm in .NET!!!!... why do i have to
use windows API for something so easily done in vb6!?!)
-Loading large listviews takes MUCH longer in .NET than it does in vb6.
Therefore I have no chioce but to use virtualmode.

But virtual listviews have their own set of problems:
-Can't use extended listview to assign images to subitems when in
virtual mode (or at least I haven't figured out how).
-Suppose I have a listviewitem selected on a very large listview.
Something changes and I need to refresh the listview, but i immediately
want to re-select that same item. When not in virtual mode, this is
very simple... but when in virtual mode, how do you do this? I have
this crazy workaround to do it, but it is by no means a quality
solution.

Lets also not forget what i pain it is now to sort a column compared to
what it used to be.

If anyone has any suggestions, explanations of why the .net listview
blows so much, links to good articles, or 3rd party listviews that
address these issues, I would be very interested in some feedback.

Thanks,
Mike

Nov 2 '06 #2
That would really really be helpful and greatly appreciated.

It's just odd to me that they wouldn't expose functionality in .Net
that's included in vb6.. i mean dont they want to encourage people to
convert their projects from vb6 to .net? why make it such a hassle?

I am aware that you can use WndProc and SendMessage to extend the
control. I found a few examples of this from a google search. However,
my problem was in using the extended listview features in conjunction
with virtualmode.

I dont know if your examples utilize the virtualmode feature, but
either way, any code examples that you can easily provide would be very
appreciated.

Thanks,
Mike

Bob Powell [MVP] wrote:
Everything the Win32 listview can do, the .NET ListView can do, thay just
didn't expose the finctionality in the .NET wrapper. You can override the
control and add to the WndProc and create properties that send messages to
the underlying control. I did a fully custom drawn listview in this manner a
while back. I'll see if I can drag up some code to get you started. It'll
have to be at the weekend because I'm mobile at the moment and don't have my
library of projects with me.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<Mi************@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Is it me, or does it seem like they put no effort into creating the
listview control in .Net.
>From what i can see, it is actually LESS powerful than the vb6
listview.

A few gripes I have with .Net listview that aren't present in vb6:

-Inability to set tooltiptext of subitems (without the use of a very
inconveniant work around).
-Inability to display images in subitems (without using the windows api
to get the extended listview.... I'm in .NET!!!!... why do i have to
use windows API for something so easily done in vb6!?!)
-Loading large listviews takes MUCH longer in .NET than it does in vb6.
Therefore I have no chioce but to use virtualmode.

But virtual listviews have their own set of problems:
-Can't use extended listview to assign images to subitems when in
virtual mode (or at least I haven't figured out how).
-Suppose I have a listviewitem selected on a very large listview.
Something changes and I need to refresh the listview, but i immediately
want to re-select that same item. When not in virtual mode, this is
very simple... but when in virtual mode, how do you do this? I have
this crazy workaround to do it, but it is by no means a quality
solution.

Lets also not forget what i pain it is now to sort a column compared to
what it used to be.

If anyone has any suggestions, explanations of why the .net listview
blows so much, links to good articles, or 3rd party listviews that
address these issues, I would be very interested in some feedback.

Thanks,
Mike
Nov 2 '06 #3
Hi Bob,

Just wondering if you were able to easily locate that code or not.

Thanks,
Mike

Bob Powell [MVP] wrote:
Everything the Win32 listview can do, the .NET ListView can do, thay just
didn't expose the finctionality in the .NET wrapper. You can override the
control and add to the WndProc and create properties that send messages to
the underlying control. I did a fully custom drawn listview in this manner a
while back. I'll see if I can drag up some code to get you started. It'll
have to be at the weekend because I'm mobile at the moment and don't have my
library of projects with me.
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<Mi************@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Is it me, or does it seem like they put no effort into creating the
listview control in .Net.
>From what i can see, it is actually LESS powerful than the vb6
listview.

A few gripes I have with .Net listview that aren't present in vb6:

-Inability to set tooltiptext of subitems (without the use of a very
inconveniant work around).
-Inability to display images in subitems (without using the windows api
to get the extended listview.... I'm in .NET!!!!... why do i have to
use windows API for something so easily done in vb6!?!)
-Loading large listviews takes MUCH longer in .NET than it does in vb6.
Therefore I have no chioce but to use virtualmode.

But virtual listviews have their own set of problems:
-Can't use extended listview to assign images to subitems when in
virtual mode (or at least I haven't figured out how).
-Suppose I have a listviewitem selected on a very large listview.
Something changes and I need to refresh the listview, but i immediately
want to re-select that same item. When not in virtual mode, this is
very simple... but when in virtual mode, how do you do this? I have
this crazy workaround to do it, but it is by no means a quality
solution.

Lets also not forget what i pain it is now to sort a column compared to
what it used to be.

If anyone has any suggestions, explanations of why the .net listview
blows so much, links to good articles, or 3rd party listviews that
address these issues, I would be very interested in some feedback.

Thanks,
Mike
Nov 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Anushya | last post by:
Hi I am using Listview and inherited listview control overriding WndProc & PreProcessMessage in ListView. I need this to customize listview to display only the page the user scrolls to. Since i...
0
by: Anushya | last post by:
Hi I am using Listview and inherited listview control overriding WndProc & PreProcessMessage in ListView. I need this to customize listview to display only the page the user scrolls to. Since i...
6
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
0
by: keith | last post by:
In a ListView control (two columns), I added a few ListView items. ListView listview=new ListView(); listview.Parent=this; listview.View=View.Details; listview.Columns.Add...
7
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override...
7
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The...
2
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
2
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
4
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.