このトピックでは、2つのツリーの間にドラッグアンドドロップ動作を有効にする C1TreeView のプロパティ設定について説明します。
<asp:Content>
タグの間に下記のマークアップを挿入して、2つのC1TreeView コントロールを作成します。
ソースビュー |
コードのコピー
|
---|---|
<cc1:C1TreeView ID="C1TreeView1" runat="server"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_0" Text="C1TreeViewNode6" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_1" Text="C1TreeViewNode4" TreeView="C1TreeView1"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_10" Text="C1TreeViewNode1" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_11" Text="C1TreeViewNode2" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_12" Text="C1TreeViewNode3" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_2" Text="C1TreeViewNode5" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_3" Text="C1TreeViewNode1" TreeView="C1TreeView1"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_30" Text="C1TreeViewNode1" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_31" Text="C1TreeViewNode2" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_32" Text="C1TreeViewNode3" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_4" Text="C1TreeViewNode2" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_5" Text="C1TreeViewNode3" TreeView="C1TreeView1"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_50" Text="C1TreeViewNode1" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_51" Text="C1TreeViewNode2" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="" StaticKey="C1TreeView1_52" Text="C1TreeViewNode3" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Owner="C1TreeView1" StaticKey="C1TreeView1_6" Text="C1TreeViewNode7" TreeView="C1TreeView1"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeView <cc1:C1TreeView ID="C1TreeView2" runat="server"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode6"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode2"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode7"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode8"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode2"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode3"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode4"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode2"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode3"> <Nodes> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode1"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode2"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode3"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode4"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode5"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode6"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode7"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode4"> </cc1:C1TreeViewNode> <cc1:C1TreeViewNode runat="server" CheckState="UnChecked" NodeIndex="0" Text="C1TreeViewNode5"> </cc1:C1TreeViewNode> </Nodes> </cc1:C1TreeView> |
<cc1:C1TreeView>
タグの間にAllowDrag="True"
及び AllowDrop="True"
を追加して、タグを下記例のようにします。
ソースビュー |
コードのコピー
|
---|---|
<cc1:C1TreeView ID="C1TreeView1" runat="server" AllowDrag="True" AllowDrop="True"> |
<cc1:C1TreeView>
タグの間にAllowDrop="True"
を追加して、タグを下記例のようにします。
ソースビュー |
コードのコピー
|
---|---|
<cc1:C1TreeView ID="C1TreeView2" runat="server" AllowDrop="True"> |