Syntax
Public Sub ClearListItems()
Description
This method is used toclear all items in list view.
Sample
Dim colvalues as System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewcolumn)Dim colvalue as VTLGeneral.VTLControls.ListViewcolumnDim lst as VTLGeneral.VTLControls.VTLListViewDim frm as VTLGeneral.VTLFormDim itemvalues as New System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewItem)Dim itemvalue as VTLGeneral.VTLControls.ListViewItem Public Sub main() lst= New VTLGeneral.VTLControls.VTLListView("lst1") frm= New VTLGeneral.VTLForm("frm1")frm.AddVTLControl(lst)lst.Height = "2000"lst.width = "2000" Dim btn as VTLGeneral.VTLControls.CChartObjectButton btn = New VTLGeneral.VTLControls.CChartObjectButton("btn1") frm.AddVTLControl(btn) btn.caption = "Clear" colvalues = New System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewcolumn) colvalue = New VTLGeneral.VTLControls.ListViewcolumncolvalue.Text = "Col1"colvalue.Key = "Col1"colvalue.Index = cstr(1)colvalues.add(colvalue) lst.AddHeader(colvalues)colvalues.clear() colvalues = New System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewcolumn)colvalue = New VTLGeneral.VTLControls.ListViewcolumncolvalue.Text = "Col2"colvalue.Key = "Col2"colvalue.Index = cstr(2)colvalues.add(colvalue) lst.AddHeader(colvalues)colvalues.clear() frm.show() itemvalue = New VTLGeneral.VTLControls.ListViewItemitemvalue.Text = "Data"itemvalue.Key = "S" itemvalue.Index = CSTR(1)itemvalue.AddSubItem("info1") itemvalues.add(itemvalue) lst.AddListItem(itemvalues) End SubPublic Sub frm1_btn1_click()lst.ClearListItems() End Sub
See Also