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.
How To Edit data in ListView in vb.Net
Page 1 of 14 Replies - 45444 Views - Last Post: 28 November 2005 - 10:19 PM
Replies To: How To Edit data in ListView in vb.Net
#2
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.
#3
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.
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.
#4
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
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
#5
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
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
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|