Edit listview

I would like to edit item and subitem of listview using vbcode in vb.n

Page 1 of 1

2 Replies - 2923 Views - Last Post: 11 February 2009 - 08:02 AM Rate Topic: -----

#1 gautampasoba  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-February 09

Edit listview

Post icon  Posted 09 February 2009 - 09:11 PM

I would like to edit item and subitem of listview using vbcode in vb.net
Is This A Good Question/Topic? 0
  • +

Replies To: Edit listview

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: Edit listview

Posted 09 February 2009 - 09:58 PM

Every item in the ListView has an identifier (an integer). You can edit it by calling the Items member from the ListView control with a specific ID and change any properties the same way you would change them for any other control.
Was This Post Helpful? 0
  • +
  • -

#3 CodePoet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-February 09

Re: Edit listview

Posted 11 February 2009 - 08:02 AM

View Postgautampasoba, on 9 Feb, 2009 - 08:11 PM, said:

I would like to edit item and subitem of listview using vbcode in vb.net


The user can edit the first column (the item) in a listview by clicking on it and editing the text. However, the ListView doesn't provide that functionality for editing any subitems (hence the name 'listVIEW'). You have a couple of choices here; either roll your own ListView edit routine, or switch to using a data grid. As far as which events to 'hook', the double click event works great for popping up a new form to allow the user to enter the data.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1