On the server side, I've built a RadTreeView whose nodes have attributes.
My service, GetNodes(), is called, but the node.Attributes count is 0.
Is this supposed to work? Any ideas what I could be missing? Might I need to add a [WebInvoke ...] attribute to my web method, perhaps changing the method style?
(Note that the attribute(s) are available from the client side; they just don't seem to make it through to the web service.)
Thanks.
RadTreeView tree =
new
RadTreeview();
tree.ID =
"MyRadTree"
;
tree.WebServiceSettings.Path =
"MyServices.svc"
;
tree.WebServiceSettings.Method =
"GetNodes"
...
RadTreeNode nodes =
new
RadTreeNode();
...
RadTreeNode expandNode1 =
new
RadTreeNode();
expandNode1.Text =
"Apples"
;
expandNode1.Value =
"1"
;
expandNode1.Attributes.Add(
"NodeType"
,
"Fruit"
);
expandNode1.ExpandNode = TreeNodeExpandNode.WebService;
...
tree.Nodes.AddRange(nodes);
My service, GetNodes(), is called, but the node.Attributes count is 0.
[OperationContract]
public
RadTreeNodeData[] GetNodes(RadTreeNodeData node, IDictionary<
string
,
object
> context)
{
string
value = node.Value;
// ok
string
text = node.Text;
// ok
int
attributeCount = node.Attributes.Count;
// 0
string
attribute = node.Attributes[
"NodeType"
];
// Exception "The given key was not present in the dictionary"
}
Is this supposed to work? Any ideas what I could be missing? Might I need to add a [WebInvoke ...] attribute to my web method, perhaps changing the method style?
(Note that the attribute(s) are available from the client side; they just don't seem to make it through to the web service.)
Thanks.