473,739 Members | 5,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Item Check on Listview

I have a form with a list view control that has the checkboxes property set
to true. This provides checkboxes as the first column in the listview.

When a listviewitem is checked another form is popped up with an ok and
cancel button it - only if the user clicks the ok button this form do I want
the item in the listview to be checked.

I have overriden the ItemCheck event of the listview and set the e.newvalue
to be unchecked when the cancel button on the other form is clicked. This
works correctly except when the item in the listview is selected before it
is clicked. If the user highlights the row in the listview and then clicks
the item whatever the e.newvalue is set to it always ends up being checked.
This is the same when the listview item is double clicked - the item will be
checked if it was previouly unchecked - regardless of the e.newvalue.
Could anyone suggest how I could override this functionality or stop this
occuring in the future.

Thanks
Sandra
Jul 21 '05 #1
0 1583

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

Similar topics

2
9594
by: VR | last post by:
I have a form with a list view control, a button control and a main menu with menuDelete item. Any time I am handling a button click event or menuDelete click event I call DeleteItem() function which removes the selected item from the list. If I right-click on my list, I clone menuDelete item and display a pop-up menu. So, if user selects Delete item in the menu, I go through the same logic and remove the selected item.
3
9107
by: Rookie | last post by:
Hi, Is there any way I can keep an item in a ListView higlighted even when the ListView does not have focus. eg. If the user is modifying the row by entering values in a TextBox then the TextBox has focus, but I still want the corresponding row in the ListView to be higlighted. Is this possible? Hope to hear from someone out there. Links to articles that describe
5
37271
by: Richard Bond | last post by:
I'm having a lot of trouble programatically selecting a listview item. How do you do this? These didn't work for me in the context of the sub below (that's trying to move up an Item in the listview) MeasView.Items(ItemIndex - 1).Selected = True MeasView.Items(ItemIndex - 1).Focused = True I would really appreciate some help.
0
330
by: Sandra | last post by:
I have a form with a list view control that has the checkboxes property set to true. This provides checkboxes as the first column in the listview. When a listviewitem is checked another form is popped up with an ok and cancel button it - only if the user clicks the ok button this form do I want the item in the listview to be checked. I have overriden the ItemCheck event of the listview and set the e.newvalue to be unchecked when the...
3
4875
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a probable internet link. Is there a way to do that? I've looked through the help and can't find anything that, well, helps. Perhaps I'm using the wrong control. Any help would be appreciated. Thanks Steve
4
10847
by: Pucca | last post by:
How can I tell a mouse right clicks over a listview item that's in a container panel. I only want to display a popup menu if the user right click the mouse over an item on the Listview. I don't not want to display this menu if a node selected on the listview but user right click over the empty space of the panel that contain the listview. The problem here is when I use the Listview's Click Event, I don't have ways to verify if the...
1
5242
by: plmanikandan | last post by:
Hi, I have a listview with items,subitems.I tems and subitems are added as below listView1.View = View.Details; listView1.Columns.Add("Column 1", 100,HorizontalAlignment.Center); listView1.Columns.Add("Column 2", 100,HorizontalAlignment.Center); listView1.Columns.Add("Column 3", 100,HorizontalAlignment.Center); listView1.Columns.Add("Column 4", 100,HorizontalAlignment.Center); System.Windows.Forms.ListViewItem itmp = new
5
2553
by: Bart Steur | last post by:
Hi, What's the best way to programmaticly select (click) another listview Item after removing the selected/focused one. using VB2005 Express. Thanks Bart
4
13861
by: Bill-R | last post by:
I'm trying to convert a vb6 program to vb.net (vb2008 express) I have text data in a Listview Control I use a Textbox to enter characters to search the Listview When a Match is found, I use textbox_textchanged to select listview item Listview1.Items(z).Selected = True Listview1.Items(z).EnsureVisible () Listview1.Items(z).FullRowSelect = True Listview1.Items(z).ForeColor = Blue
0
8792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9479
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
9337
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
9266
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
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
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
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3280
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
2
2748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.