FineUI 官方论坛
标题:
Tree1复制到Tree2后,修改Tree2的标题???
[打印本页]
作者:
yygy
时间:
2014-5-25 23:13
标题:
Tree1复制到Tree2后,修改Tree2的标题???
本帖最后由 yygy 于 2014-5-25 23:14 编辑
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" />
<f:Tree ID="tree1" Width="350px" ShowHeader="true" Title="树控件(内联)" EnableFrame="true" EnableCollapse="true"
runat="server">
<Nodes>
<f:TreeNode Text="河南省" Expanded="true"></f:TreeNode>
<f:TreeNode Text="安徽省" Expanded="true"></f:TreeNode>
</Nodes>
</f:Tree>
<f:TwinTriggerBox ID="ttbxMyBox2" ShowLabel="false" OnTrigger1Click="ttbxMyBox2_Trigger1Click"
Trigger1Icon="Search" ShowTrigger2="false" EmptyText="新标题" Trigger2Icon="Date" runat="server">
</f:TwinTriggerBox>
<f:Tree ID="tree2" Width="350px" ShowHeader="true" Title="修改标题" EnableFrame="true" EnableCollapse="true"
runat="server">
</f:Tree>
</form>
----------------
protected void yTreeItem(FineUI.Tree d, string Fs)
{
int i = 0;
FineUI.TreeNode N;
while (i < d.Nodes.Count)
{
N = d.Nodes[i];
N.Text = Fs+"-"+N.Text;
i++;
}
}
protected void ttbxMyBox2_Trigger1Click(object sender, EventArgs e)
{
tree2.Nodes.Clear();
foreach (FineUI.TreeNode N in tree1.Nodes)
{
tree2.Nodes.Add(N);
}
yTreeItem(tree2, ttbxMyBox2.Text);
}
复制代码
修改Tree2的标题同时又修改了Tree1的标题,点解?只想修改Tree2的标题,不修改Tree1的标题。
[attach]5312[/attach]
作者:
yygy
时间:
2014-5-26 13:36
是不是说得不明白?
首先复制Tree1到Tree2,然后修改Tree2的节点的标题。
[attach]5315[/attach]
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4