Jump to content

Recommended Posts

Posted

Hello!

 

I've been looking into the ListView control and there is one thing I hope someone here can answer.

 

Every instance of a ListView has a Groups property which returns a ListViewGroupCollection. It is not explicitly possible to instantiate a ListViewGroupCollection, I get the following error:

"Error*1*The type 'System.Windows.Forms.ListViewGroupCollection' has no constructors defined [...]"

But obviously has the ListView class instatiated one instance of ListViewGroupCollection; how has that been done? Some kind of friend class?

 

Another question is regarding when adding ListViewItems to a group's Items property (theListView.Groups[0].Items.Add(...)). How does "theListView" know when an item is added to the collection of items, so that it can add it to the control? Does "theListView" listen to events that*ListViewItemCollection triggers when adding, removing..? Or does the collection have a reference to "theListView"..?

 

Thanks in advance

 

// Martin

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...