|
-
Jul 2nd, 2003, 09:47 AM
#1
Thread Starter
New Member
List View *** RESOLVED******
Hello
I have created a entry form that has a couple of comboboxes
text boxes extc.. Now I also have a listview in the detail view that I am using to store some of these values that the user enters Now all I need to know is how do I delete a row that the user has selected
I know I will use the listview.checkboxes to see if the user has selected that item but today I seem to be having a mental lapse
thanks for the assistance
Last edited by vbnet20; Jul 2nd, 2003 at 01:48 PM.
-
Jul 2nd, 2003, 10:51 AM
#2
Fanatic Member
VB Code:
ListView1.CheckedItems.Item(0).Remove()
I have two simple requests: 1) Use useful and specific topics. 2) Modify your topic to include [Resolved] when you problem has been resolved. Both of these make the bulletin boards more useful and efficient. Thanks.
-
Jul 2nd, 2003, 12:07 PM
#3
Thread Starter
New Member
Thanks
It works on the first item I try to delete however if I scroll up or down and try to delete another checked item it doesnt delete the item that I checked off so I used the following code to only delete the checked item,
If ListView1.CheckedItems.Item(0).Checked = True Then
ListView1.CheckedItems.Item(0).Remove()
End If
but I still have the problem of deleting items any suggestions
Thanks
-
Jul 2nd, 2003, 12:15 PM
#4
Fanatic Member
FYI, you need to check if there are any CheckedItems (if .Count > 0). In addition, when you're testing a boolean expression, you don't need to do "if BooleanValue = true then" -- just do "if BooleanValue then".
The CheckedItem collection will ONLY contain listview items that are checked, so you don't need to test if the checked value is true. If you want to delete all the checked items, then just remove the index 0 item .Count times.
I have two simple requests: 1) Use useful and specific topics. 2) Modify your topic to include [Resolved] when you problem has been resolved. Both of these make the bulletin boards more useful and efficient. Thanks.
-
Jul 2nd, 2003, 01:50 PM
#5
Thread Starter
New Member
Thanks
VictorB212
Do you know of any good books out there that talks
extensively about windows controls
-
Jul 2nd, 2003, 01:52 PM
#6
Fanatic Member
I haven't bought any myself, but I'd say a trip to your local Barnes & Noble or other big bookstore should prove fruitful -- there are lots of VS.NET books out there. A search tip -- books on "Windows.Forms" should contain lots about controls.
I have two simple requests: 1) Use useful and specific topics. 2) Modify your topic to include [Resolved] when you problem has been resolved. Both of these make the bulletin boards more useful and efficient. Thanks.
-
Jul 2nd, 2003, 02:21 PM
#7
Sleep mode
Originally posted by vbnet20
Do you know of any good books out there that talks
extensively about windows controls
I have Mastering Visual Basic .NET (Sybex) . It's reference book contains 1200 pages . It's great book . In intermediate level , it talks about ListView and TreeView controls in details .
-
Jul 2nd, 2003, 02:22 PM
#8
Fanatic Member
Pirate: Does it talk about altering them (like adding 3-state checkboxes or putting icons in the listview header)?
I have two simple requests: 1) Use useful and specific topics. 2) Modify your topic to include [Resolved] when you problem has been resolved. Both of these make the bulletin boards more useful and efficient. Thanks.
-
Jul 2nd, 2003, 02:36 PM
#9
Sleep mode
Originally posted by VictorB212
Pirate: Does it talk about altering them (like adding 3-state checkboxes or putting icons in the listview header)?
I was going through the book but never mentioned these issues . It talks about sorting & and stuff but it's really more than intermediate level . Here is the content (weird they didn't mention it ) : http://www.sybex.com/sybexbooks.nsf/...e!OpenDocument
-
Jul 2nd, 2003, 03:45 PM
#10
Thread Starter
New Member
Yeah Pirate
I have a couple of books Programming Visual Basic.net
and Programming Windows using Visual Basic.net and they cover
some controls but they donot seem to cover advanced topics and these books are considered intermediate to advanced and funny thing victorb I was just in the book store yesterday trying to find a book that covered listview,datagrid or anyother windows contol in great detail. Like for example most books that talk about the datagrid use a database suppose you want to work with arrays
I know how to but I am just using that as an example
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|