I update to Telerik Q1 2009, also, change TreeView web service from asmx to svc.
Here is the piece of code from Telerik Help:
<script type="text/javascript">
function nodePopulating(sender, eventArgs)
{
varnode = eventArgs.get_node();
var context =eventArgs.get_context();
context["CategoryID"] =node.get_value();
}
</script>
function nodePopulating(sender, eventArgs)
{
varnode = eventArgs.get_node();
var context =eventArgs.get_context();
context["CategoryID"] =node.get_value();
}
</script>
[OperationContract]
publicRadTreeNodeData[] GetTreeViewCategories(RadTreeNodeDatanode, object context)
{
// extract the"context" dictionary information. OnClientNodePopulating event loads thedictionary
IDictionary<string, object> contextDictionary =(IDictionary<string,object>)context;
....
}
publicRadTreeNodeData[] GetTreeViewCategories(RadTreeNodeDatanode, object context)
{
// extract the"context" dictionary information. OnClientNodePopulating event loads thedictionary
IDictionary<string, object> contextDictionary =(IDictionary<string,object>)context;
....
}
I get the error:
System.InvalidCastException was unhandled by user code
Message="Unable to cast object of type 'System.Object' to type 'System.Collections.Generic.IDictionary`2[System.String,System.Object]'."
Source="App_Code.3vtfiouj"
....
How do I fix it?
Thanks.