Note that there are some explanatory texts on larger screens.

plurals
  1. POReset a listviewitem which is linked to listview
    text
    copied!<p>I have a listview which is bound to a listviewitem as you will see below - problem is I need to clear out the database on a timer and start from scratch,</p> <p>I know to clear the listview I just do </p> <pre><code>listview.items.clear() </code></pre> <p>problem is I need to also clear the listviewitem or it is going to rebind the same information to the listview.</p> <p>declared:</p> <pre><code> Dim TempStr(7) As String Dim TempNode As ListViewItem </code></pre> <p>problematic statement:</p> <pre><code> listview2.items.clear() For pop As Integer = 0 To pendrun.Rows.Count - 1 TempStr(0) = pendrun.Rows(pop)("RID") Select Case pendrun.Rows(pop)("Utype") Case 1 TempStr(1) = "BLS Ambulance" Case 2 TempStr(1) = "ALS Ambulance" Case 3 TempStr(1) = "SCT Ambulance" Case 4 TempStr(1) = "Wheelchair Van" Case 5 TempStr(1) = "Taxi" End Select Select Case pendrun.Rows(pop)("Curgency") Case 1 TempStr(2) = "Scheduled" Case 2 TempStr(2) = "Non-Scheduled" Case 3 TempStr(2) = "ASAP" Case 4 TempStr(2) = "STAT" End Select TempStr(3) = pendrun.Rows(pop)("Pname") TempStr(4) = pendrun.Rows(pop)("Texttime") TempStr(5) = pendrun.Rows(pop)("sname") &amp; " - " &amp; pendrun.Rows(pop)("sfaddress") &amp; ", " &amp; pendrun.Rows(pop)("sfcity") &amp; ", " &amp; pendrun.Rows(pop)("sfstate") TempStr(6) = pendrun.Rows(pop)("dname") &amp; " - " &amp; pendrun.Rows(pop)("dfaddress") &amp; ", " &amp; pendrun.Rows(pop)("dfcity") &amp; ", " &amp; pendrun.Rows(pop)("dfstate") TempNode = New ListViewItem(TempStr) ListView2.Items.Add(TempNode) next </code></pre> <p>How do I flush all data from tempnode?</p> <p>I did find</p> <pre><code>TempNode.SubItems.clear() </code></pre> <p>but this does not appear to work</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload