Syntax
Public Sub AddHeader(ByVal columns As List(Of ListViewcolumn))
Description
An object that hold listView item data.
Parameters
Parameter |
Description |
Text |
Get or set list view item text |
Key |
Get or set item key in list view |
Index |
Get or set item index in list view |
Sample
Public Sub main()
Dim colvalue As VTLGeneral.VTLControls.ListViewcolumn
Dim itemvalue As VTLGeneral.VTLControls.ListViewItem
Dim colvalues As new System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewcolumn)
Dim itemvalues As new System.Collections.Generic.List(Of VTLGeneral.VTLControls.ListViewItem)
Dim frm As new VTLGeneral.VTLForm("frm1")
Dim lst As VTLGeneral.VTLControls.VTLListView
Dim listOfcolumns As new VTLGeneral.VTLControls.ListViewcolumns
lst = new VTLGeneral.VTLControls.VTLListView("lst1")
lst.Width = "3600"
frm.AddVTLControl(lst)
frm.show()
lst.Height = "1600"
for i as integer = 1 to 11
colvalue = new VTLGeneral.VTLControls.ListViewcolumn
colvalue.Text = "VertexVTL" & i
colvalue.Key = "VertexVTL" & i
colvalue.Index = cstr(i)
colvalues.add(colvalue)
next
lst.AddHeader(colvalues)
colvalues.clear()
colvalue = new VTLGeneral.VTLControls.ListViewcolumn
colvalue.Text = "VertexVTL" & 5
colvalue.Key = "VertexVTL" & 5
colvalue.Index = cstr(5)
colvalues.add(colvalue)
colvalue = new VTLGeneral.VTLControls.ListViewcolumn
colvalue.Text = "VertexVTL" & 6
colvalue.Key = "VertexVTL" & 6
colvalue.Index = cstr(6)
colvalues.add(colvalue)
lst.RemoveColumnByIndex(colvalues)
for j as integer = 1 to 50
itemvalue = new VTLGeneral.VTLControls.ListViewItem
itemvalue.Text = "Text" & j
itemvalue.Key = "Key" & j
itemvalue.Index = CSTR(j)
itemvalue.AddSubItem("item" & j)
itemvalue.AddSubItem("item" & j)
itemvalue.AddSubItem("item" & j)
itemvalue.AddSubItem("item" & j)
itemvalues.add(itemvalue)
next
lst.AddListItem(itemvalues)
itemvalues.clear()
itemvalue = new VTLGeneral.VTLControls.ListViewItem
itemvalue.Text = "Text" & 11
itemvalue.Key = "Key" & 11
itemvalue.Index = CSTR(11)
itemvalues.add(itemvalue)
lst.RemoveItemByIndex(itemvalues)
End Sub
See Also
Back to VTL Server Script Index
|