I have a radtreeview that I am initially data binding in the my page code but any node expansion relies on a call to a SVC web service. The problem is that while the event fires properly and runs the following method out of my webservice:
[OperationContract]
[WebMethod]
public RadTreeNodeData[] TreeViewNodeExpand(RadTreeNodeData ExpandedNode,
object context) {
// blah blah some code
}
The RadTreeNode ExpandedNone parameter is null. When I built the initial tree in my code behind, I set
List<RadTreeNode> collection
= (data.Select(x => new RadTreeNode
{
Category = category,
ExpandMode = WebService,
Value = x.Value.ToString(),
Text = x.Text,
DataItem = 555
})).ToList();
I explicitly set DataItem开发者_如何学Go to '555'. Am I missing something as to why RadTreeNodeData ExpandedNode is null when the webservice method fires?
My radtreeview markup is below:
<telerik:RadTreeView ID="treeView" CheckBoxes="true" PersistLoadOnDemandNodes="true"
TriStateCheckBoxes="True" runat="server" CheckChildNodes="True" CausesValidation="false"
EnableEmbeddedSkins="false" Skin="VBoD">
<WebServiceSettings Path="~/WebServices/Retriever.svc" Method="TreeViewNodeExpand">
</WebServiceSettings>
</telerik:RadTreeView>
I assume signature of service method is stronly fixed:
RadTreeNodeData[] WebServiceMethodName(RadTreeNodeData node, object context).
You should rename 'ExpandedNode' to 'node'.
精彩评论