﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Problem populating listview manually</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 24 May 2026 15:31:49 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem populating listview manually</title><link>http://forum.strataframe.net/FindPost27873.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I 've been looking through the listview-exampled and was impressed by the header/footer-example. I tried to copy this and replace my declaration of the standard listviewitem with what I saw in the example:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;Dim lv1 as stratalistviewtem&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;but this ist not possible because there (intellisense) is no such item. &lt;/P&gt;&lt;P&gt;What I am trying to do is to populate a listview manually like this:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;P&gt;LV.GridLines = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;True&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;P&gt;LV.View = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;View&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;.Details&lt;/P&gt;&lt;P&gt;LV.Columns.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"Titel"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;, 300, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;HorizontalAlignment&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;.Left)&lt;/P&gt;&lt;P&gt;LV.Columns.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"Lief."&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;, 50, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;HorizontalAlignment&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;.Left)&lt;/P&gt;&lt;P&gt;LV.Columns.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"DB1"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;, 100, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;HorizontalAlignment&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;.Left)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt; lv1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;ListViewItem&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;P&gt;lv1 = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;ListViewItem&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"Ein Titel"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;lv1.SubItems.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"C-BZ"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;lv1.SubItems.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"BZOnline"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;LV.Items.Add(lv1)&lt;/P&gt;&lt;P&gt;lv1 = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;&lt;FONT color=#0000ff size=2 face="Courier New"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;&lt;FONT color=#2b91af size=2 face="Courier New"&gt;ListViewItem&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"Noch ein Titel"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;lv1.SubItems.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"C-BALM"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;lv1.SubItems.Add(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;&lt;FONT color=#a31515 size=2 face="Courier New"&gt;"LDSLBS"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2 face="Courier New"&gt;&lt;FONT size=2 face="Courier New"&gt;)&lt;/P&gt;&lt;P&gt;LV.Items.Add(lv1)&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;This code works fine, but I am not able to replace the listviewitem-declaration with the&lt;/P&gt;&lt;P&gt;stratalistviewitem-declaration.&lt;/P&gt;&lt;P&gt;What am I doing wrong? Is there a missing import-statement or something like this?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Thomas</description><pubDate>Mon, 09 Aug 2010 09:35:06 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: Problem populating listview manually</title><link>http://forum.strataframe.net/FindPost27878.aspx</link><description>Oh, got it Thomas. &lt;/P&gt;&lt;P&gt;Glad you got it working! ;)</description><pubDate>Mon, 09 Aug 2010 09:35:06 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Problem populating listview manually</title><link>http://forum.strataframe.net/FindPost27876.aspx</link><description>Hi Ivan,&lt;/P&gt;&lt;P&gt;I had a look at it (that's where I saw the example which impressed me), but my error was that I used the wrong listview. Shame on me...&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas</description><pubDate>Mon, 09 Aug 2010 09:07:00 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: Problem populating listview manually</title><link>http://forum.strataframe.net/FindPost27874.aspx</link><description>Hi Thomas.&lt;/P&gt;&lt;P&gt;Have you had a look at the StrataListView sample? Here is the link to it:&lt;/P&gt;&lt;P&gt;&lt;A href="http://forum.strataframe.net/FindPost24981.aspx"&gt;http://forum.strataframe.net/FindPost24981.aspx&lt;/A&gt;</description><pubDate>Mon, 09 Aug 2010 07:52:00 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>