4 Replies - 47606 Views - Last Post: 28 November 2005 - 10:19 PM Rate Topic: -----

#1 tinasunils  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 11-May 05

How To Edit data in ListView in vb.Net

Posted 15 June 2005 - 02:13 AM

Hi,

Can anybody help me how to edit and add data to listview at runtime in vb.net.I want to display a combo for seletion in the first column of the list view.The second column i want a textbox so that the second column the user can change.The combo and textbox nedd not display always.Only when the focus comes to a row,then only it need to display.

Can any body help me in this very complicated situation.

Reply pls,

Tina.

Is This A Good Question/Topic? 0
  • +

Replies To: How To Edit data in ListView in vb.Net

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: How To Edit data in ListView in vb.Net

Posted 15 June 2005 - 05:25 AM

Can you be alittle more specific about what you are trying to achieve? It is not difficult to dynamically generate options in list boxes...the key is to define exactly what you would like to see happen (perhaps illustrated with an example), and then write the functions to achieve those golas. In this case, it is likely that you will have a function that populates a second column based on whatever option is chosen in the first column. Judicious use of the myList.Item.Add method can likely accomplish this.
Was This Post Helpful? 0
  • +
  • -

#3 tinasunils  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 11-May 05

Re: How To Edit data in ListView in vb.Net

Posted 18 June 2005 - 02:15 AM

hi,

Now i did the code for editing the listview at runtime using combobox in the first column and textbox in the second column.by writing code in the mouseup event of the listview i have written the code for showing combobox if click in the first column and to show a textbox if click in the 2nd column.Now i am facing problem for adding a new row to the listview.i.e if there are two rows and the user is clicking on the third row ,the user shld be able to enter data using combobox and textboxes.
Reply pls.

Tina.
Was This Post Helpful? 0
  • +
  • -

#4 sreevani  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-October 05

Re: How To Edit data in ListView in vb.Net

Posted 16 October 2005 - 11:16 PM

Hi
Can u tell me how u have done this
I would like to have a Checkbox in the first column ,combo in the second and text in the third column and one more combo in the fourth column of the listview control
Was This Post Helpful? 0
  • +
  • -

#5 abdullah  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 28-November 05

Re: How To Edit data in ListView in vb.Net

Posted 28 November 2005 - 10:19 PM

hay buddy

i can't understand ur question but this might help you..
Dim item As New ListViewItem


item.SubItems.Ad(Me.textColumName.Text)
item.SubItems.Add(Me.combDataType.SelectedItem)
listview1.Items.AddRange(New ListViewItem() {item})

i hop this will help
Was This Post Helpful? 1

Page 1 of 1