开发者

ASP.NET: Get TreeNode's Container TreeView

开发者 https://www.devze.com 2023-03-19 21:09 出处:网络
How to get the co开发者_JAVA技巧ntainer TreeView of a TreeNode ?? Thank you all.There does not seem to be a way other than reflection:

How to get the co开发者_JAVA技巧ntainer TreeView of a TreeNode ??

Thank you all.


There does not seem to be a way other than reflection:

TreeNode node = GetNode();
TreeView view = 
    (TreeView) node.GetType().
        GetProperty("Owner", BindingFlags.Instance | BindingFlags.NonPublic).
            GetValue(node, null);
0

精彩评论

暂无评论...
验证码 换一张
取 消