请看一下我这个例子,为什么不能得到选中的值,我是根据贴子里面做的
<form id="form1" runat="server">
<div>
</div>
<wijmo:C1TreeView ID="C1TreeView1" runat="server" ShowCheckBoxes="True">
<Nodes>
<wijmo:C1TreeViewNode Text="文件夹 1">
<Nodes>
<wijmo:C1TreeViewNode Text="文件夹 1.1">
<Nodes>
<wijmo:C1TreeViewNode Text="文件夹 1.1.1">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.1.2">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.1.3">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.1.4">
</wijmo:C1TreeViewNode>
</Nodes>
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.2">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.3">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.4">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 1.5">
</wijmo:C1TreeViewNode>
</Nodes>
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 2">
<Nodes>
<wijmo:C1TreeViewNode Text="文件夹 2.1">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 2.2">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 2.3">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 2.4">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 2.5">
</wijmo:C1TreeViewNode>
</Nodes>
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 3">
<Nodes>
<wijmo:C1TreeViewNode Text="文件夹 3.1">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 3.2">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 3.3">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 3.4">
</wijmo:C1TreeViewNode>
<wijmo:C1TreeViewNode Text="文件夹 3.5">
</wijmo:C1TreeViewNode>
</Nodes>
</wijmo:C1TreeViewNode>
</Nodes>
</wijmo:C1TreeView>
<script type="text/javascript">
function GetSelectedNode() {
var selectedNodes = $("#<%= C1TreeView1.ClientID %>").c1treeview("getSelectedNodes");
var text = selectedNodes[0]._text;
alert("Text: " + text);
}
</script>
<input id="Button1" type="button" value="button" onclick="GetSelectedNode();" />
</form> |
|