StrataFrame Forum

Problem populating listview manually

http://forum.strataframe.net/Topic27873.aspx

By Thomas Holste - 8/9/2010

Hi,

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:

Dim lv1 as stratalistviewtem

but this ist not possible because there (intellisense) is no such item.

What I am trying to do is to populate a listview manually like this:

LV.GridLines = True

LV.View = View.Details

LV.Columns.Add("Titel", 300, HorizontalAlignment.Left)

LV.Columns.Add("Lief.", 50, HorizontalAlignment.Left)

LV.Columns.Add("DB1", 100, HorizontalAlignment.Left)

Dim lv1 As ListViewItem

lv1 = New ListViewItem("Ein Titel")

lv1.SubItems.Add("C-BZ")

lv1.SubItems.Add("BZOnline")

LV.Items.Add(lv1)

lv1 = New ListViewItem("Noch ein Titel")

lv1.SubItems.Add("C-BALM")

lv1.SubItems.Add("LDSLBS")

LV.Items.Add(lv1)

This code works fine, but I am not able to replace the listviewitem-declaration with the

stratalistviewitem-declaration.

What am I doing wrong? Is there a missing import-statement or something like this?

Thanks in advance

Thomas

By Ivan George Borges - 8/9/2010

Hi Thomas.

Have you had a look at the StrataListView sample? Here is the link to it:

http://forum.strataframe.net/FindPost24981.aspx

By Thomas Holste - 8/9/2010

Hi Ivan,

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...

Best regards

Thomas

By Ivan George Borges - 8/9/2010

Oh, got it Thomas.

Glad you got it working! Wink