NewsBot Posted March 3, 2008 Posted March 3, 2008 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 Quote View All Our Microsft Related Feeds
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.