I'm writing an AutoCAD Plug-in that shows all the entities as Nodes in a TreeView. I want to be able to get the object from the Node to be able to work with programmatically. This is my code for when a node is clicked:
private void treeView1_MouseClick(object sender, MouseEventArgs e)
{
TreeNode node = treeView1.SelectedNode;
propertyGrid1.SelectedObject = node;
/*Entity selectedEntity = node.getObject() as Entity; Pseudo-code, need to know how to do this*/
}
TreeNode.Tagfor storing an arbitrary object ref if that's what your looking for.