I am trying to figure out a way to take the custom attributes of a FileExplorerItem and populate the attributes of the treeview nodes, but I cannot seem to find th ebest way to do this. The only solution I have seen in my searching is in http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/how-to-get-attributes-on-client-with-explorermode-filetree.aspx. However, that is a real pain because I have 12 custom attributes I could possibly use from my custom provider that allows file browsing access to our Documentum system. I have tried hooking routines into the TreeView control of the FileExplorer, but its not working as I expected. Here is what I have.
When I step through the code they node gets filled, but the attributes never make to the client side.Consequentially I don't see where the childnodes get databound. There must be something with the way the tree is populated that I am missing.
I am going for now use the approach in the link above, but it is not ideal.
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
RadFileExplorer1.TreeView.NodeDataBound +=
new
RadTreeViewEventHandler(RadTreeView_OnNodeDataBound);
}
private
void
FillTreeViewNodesWithAttributes(RadTreeNode node)
{
FileBrowserItem fileBrowserItem = (FileBrowserItem)node.DataItem;
foreach
(
string
key
in
fileBrowserItem.Attributes.AllKeys)
{
node.Attributes[key] = fileBrowserItem.Attributes[key];
}
if
(node.Nodes.Count > 0)
{
foreach
(RadTreeNode childNode
in
node.Nodes)
{
FillTreeViewNodesWithAttributes(childNode);
}
}
}
When I step through the code they node gets filled, but the attributes never make to the client side.Consequentially I don't see where the childnodes get databound. There must be something with the way the tree is populated that I am missing.
I am going for now use the approach in the link above, but it is not ideal.