D
Doug Handler
Hi,
I'm using a modified Tree control that contains a Tag property of Object. I
iterate through two different tables to build the Tree w/ root nodes being
Groups and child nodes being GroupMembers. As i iterate, i'm adding to the
Tag property either the instance of that specific Group or GroupMember.
Works fine, all is good.
My question is this....I need to know if the user selected on the Tree a
Group "node" or a GroupMember "node." When the user clicks on the node I'm
returned the currentSelectedNode and that contains the Tag property (again
fine). What's the best way to determine if Tag is a Group or GroupMember?
I'm currently doing the following and wasn't sure if this is the best way:
Type type = this.currentSelectedNode.Tag.GetType();
if (type.Name = "Group")
.....
else
if (type.Name = "GroupMember")
.....
Thanks in advance
dh
I'm using a modified Tree control that contains a Tag property of Object. I
iterate through two different tables to build the Tree w/ root nodes being
Groups and child nodes being GroupMembers. As i iterate, i'm adding to the
Tag property either the instance of that specific Group or GroupMember.
Works fine, all is good.
My question is this....I need to know if the user selected on the Tree a
Group "node" or a GroupMember "node." When the user clicks on the node I'm
returned the currentSelectedNode and that contains the Tag property (again
fine). What's the best way to determine if Tag is a Group or GroupMember?
I'm currently doing the following and wasn't sure if this is the best way:
Type type = this.currentSelectedNode.Tag.GetType();
if (type.Name = "Group")
.....
else
if (type.Name = "GroupMember")
.....
Thanks in advance
dh