Delete ListView

  • Thread starter Thread starter muhammadanzar
  • Start date Start date
M

muhammadanzar

Guest
hi all,

i have northwind database, Data enter from text box, and show in listview.


sr.No|ProductName |Price

1 | Apple | 10$

2 |Orange | 5$

3 |Grapes | 3$

4 | Peach | 2$

------------------------------------------

Total 20$

Problem Statement.

i want to delete the sr.no: 2, Orange Product, I want the whole listview Rearrange and Price Total will be recounted. Now list Look as or Required Out Pur

sr.No|ProductName |Price

1 | Apple | 10$

2 |Grapes | 3$

3 | Peach | 2$

------------------------------------------

Total 15$

If e.KeyCode = Keys.Delete Then
'Delete Selected Items
For i As Integer = ListView1.SelectedItems.Count - 1 To 0 Step -1
ListView1.SelectedItems(i).Remove()
Next

'Clear Previously selected Items
ListView1.SelectedItems.Clear()
'Highlight only when there are items




Thanks







MUHAMMAD ANZAR E-mail : muhammadanzar@hotmail.com Mobile # :0092-3215096959

Continue reading...
 

Similar threads

M
Replies
0
Views
149
muhammadanzar
M
M
Replies
0
Views
107
muhammadanzar
M
Back
Top