WinForms: Why is Control.Parent null?

Posted by Neil Barnwell on Stack Overflow See other posts from Stack Overflow or by Neil Barnwell
Published on 2010-05-18T14:09:19Z Indexed on 2010/05/18 14:30 UTC
Read the original article Hit count: 452

Filed under:
|

I'm trying to get the parent of a listview docked within a splitcontainer, and am finding that ListView.Parent is null.

According to the documentation this should be:

A Control that represents the parent or container control of the control.

Can anyone explain why this property would be null? I've tried moving the ListView to the Form (in order to rule out weird behaviour when docked in a splitcontainer) to no avail.

© Stack Overflow or respective owner

Related posts about winforms

Related posts about .NET