473,803 Members | 4,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview subitems

On each Listview item I can add one or more so called sub-items. These
subitems appear to be little more than labels. I'm curious if I could add
something else as a subitem, for instance a textbox or combobox. Would
anyone know if that's possible and if so, how to do it?

Tia,
Martin
Mar 17 '06 #1
9 2437
Martin wrote:
On each Listview item I can add one or more so called sub-items. These
subitems appear to be little more than labels. I'm curious if I could add
something else as a subitem, for instance a textbox or combobox. Would
anyone know if that's possible and if so, how to do it?

Tia,
Martin


Have you thought about using the DataGridView control (VS.2005) instead
of the listview? This has built in support for textboxes & comboboxes.

Chris
Mar 17 '06 #2
Hi Chris,

Thanks for your response. Yes, I have given the datagrid some thought, but
there are certain features of the listview that I really would like to use,
such as those group headers; they're great!

Secondly, the choice of control (checkbox, textbox or combobox) does (for
this particular form) not depend on the column, but on the row, e.g. rows
1-4 have a textbox, row 5 a checkbox and row 6 a combobox... I don't think I
can do that in a datagrid, although I have to admit the datagridview of
VB2005 has come a long way since the datagrid of VB6.

In VB6 I used the flexgrid and "floated" the appropriate control over it,
when the user clicked a cell. I guess I need to do something similar here.

Martin
"I Don't Like Spam" <no@spam.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Martin wrote:
On each Listview item I can add one or more so called sub-items. These
subitems appear to be little more than labels. I'm curious if I could add
something else as a subitem, for instance a textbox or combobox. Would
anyone know if that's possible and if so, how to do it?

Tia,
Martin


Have you thought about using the DataGridView control (VS.2005) instead of
the listview? This has built in support for textboxes & comboboxes.

Chris

Mar 17 '06 #3

"Martin" <x@y.com> wrote in message
news:uX******** ******@TK2MSFTN GP09.phx.gbl...
Thanks for your response. Yes, I have given the datagrid some thought, but
there are certain features of the listview that I really would like to
use, such as those group headers; they're great!


DataGridView supports group headers. MS have a nice example of that.

Mar 17 '06 #4
s p


Where can i get the example of grouping headers in DataGridView??? ?

*** Sent via Developersdex http://www.developersdex.com ***
Mar 18 '06 #5
s p


Where can i get the example of grouping header in DataGridView??? ?

*** Sent via Developersdex http://www.developersdex.com ***
Mar 18 '06 #6

"s p" <nk********@yah oo.com> wrote in message
news:e0******** ******@tk2msftn gp13.phx.gbl...
Where can i get the example of grouping headers in DataGridView??? ?


http://msdn2.microsoft.com/en-us/lib...ew.groups.aspx

Mar 18 '06 #7
s p


The link is Grouping Header in ListView, How can i implement this in my
DataGridView??? ?

*** Sent via Developersdex http://www.developersdex.com ***
Mar 18 '06 #8

"s p" <nk********@yah oo.com> wrote in message
news:OS******** ******@TK2MSFTN GP11.phx.gbl...
The link is Grouping Header in ListView, How can i implement this in my
DataGridView??? ?


Sorry, my bad. I changed a project from one to the other and got confused
about which was which.

Mar 18 '06 #9
s p


What you mean is that , it is not applicable to DataGridView. Any other
idea , whether can there be grouping of headers in the DataGridView???

*** Sent via Developersdex http://www.developersdex.com ***
Mar 18 '06 #10

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

Similar topics

0
298
by: Giulio Mastrosanti | last post by:
Is it possible to have controls like progressbar or textboxes on subitems of listviewitems of a listview control in detail mode?
1
4143
by: Mark Doggett | last post by:
Hi I have a listview control with four columns. The problem I have is that the second column needs to display an image but as it is a subitem this doesn't appear to be able to be done. Does anyone have any suggestions. Thanks
2
2760
by: enchantingdb | last post by:
I'm trying to add the contents of a ListView to a SortedList. The ListView contains two columns - "Title" and "URL". I need to add both columns to the SortedList with Title being the Value and URL being the Key. I can get the information into and out of the SortedList but when I add the URL into the SortedList it is in the form "ListViewSubItem: {http://...}". The code I use for this is... ListView.CheckedListViewItemCollection...
3
1225
by: Jason Huang | last post by:
Hi, I have no problems in double_clicking on the ListView Item, however, the double_clicking seems doing nothing on the SubItems, and the subitems can't be high lighted. I am wondering what have I done wrong. Any help will be appreciated. Jason
1
2001
by: jeffbernstein | last post by:
Greetings. I have a ListView control loaded with several items and I'd like to explore the collection via the Watch Window in Visual Studio .NET 2003. My textbook was written for the previous version of Visual Studio and it looks like you're able to explore the collection via that Watch Window but I'm unable to do that in 2003. Am I missing something or has this feature gone away? I've found a few posts from people complaining about...
10
12315
by: Adam Honek | last post by:
This is probably a silly question but oh well, I can't find the answer looking via code. Having an imagelist already, how does one set an icon for a list view's sub items? I'm using the code below however the subitems doesn't have an overload allowing an image index. Adam
2
2136
by: MikeY | last post by:
Hi everyone, After reading various posts I'm still scratching my head and unsure of what approach to take. I have created buttons that upon clicking, the buttons add an item name (myName) to my ListView (lvBody) and at the same time, also add subitems(unitPrice); The problems is that if I don't have sort going on, then all "subitems" are fine. If I have sorting, then the "subitems" that are being placed above the last Alpha "subitems"...
1
19543
by: Jason Huang | last post by:
Hi, In my C# windows form project, I have a ListView mylvw. I set the property LabelEdit to true, and I can edit the Item in the mylvw. But what I want to do is not just edit the ListView Item, but also the SubItems. Would somene give me some advice? Thanks for help.
0
1306
by: girishpatil | last post by:
how to modify listview subitems data manually.listview is filled with data from datab
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.