J
Johnny Jörgensen
I've got a usercontrol containing a ListView control. I would like to
comehow expose the Listviews Item and Column collections so that I can
access them using
MyUserControl.Items.Add("NewItem");
instead of like I'm doing now:
MyUserControl.ListView.Items.Add("NewItem");
I've named the contained ListView "ListView" in order to avoid having to
write:
MyUserControl.ListView1.Items.Add("NewItem");
I tried doing:
public ListView.ListViewItemCollection Items
{
get { return this.ListView.Items; }
set { this.ListView.Items = value; }
}
....like with any other property, but it doesn't work.
Furthermore, The Items will always be added from code, but I would of
course like to be able to add the Columns to the Column collection from the
designer.
Can anybody tell me if this is possible without too much trouble...
Cheers,
Johnny J.
comehow expose the Listviews Item and Column collections so that I can
access them using
MyUserControl.Items.Add("NewItem");
instead of like I'm doing now:
MyUserControl.ListView.Items.Add("NewItem");
I've named the contained ListView "ListView" in order to avoid having to
write:
MyUserControl.ListView1.Items.Add("NewItem");
I tried doing:
public ListView.ListViewItemCollection Items
{
get { return this.ListView.Items; }
set { this.ListView.Items = value; }
}
....like with any other property, but it doesn't work.
Furthermore, The Items will always be added from code, but I would of
course like to be able to add the Columns to the Column collection from the
designer.
Can anybody tell me if this is possible without too much trouble...
Cheers,
Johnny J.