roman.buzuk
22 Nov 2012, 12:15 AM
Sorry for mistakes in English.
I am trying to use example from Drag and Drop betweens two TreePanels (http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/tree/two-trees.html), but it isn`t working good. When I try to expand folders or drag, I receive error that 'internalId' is null or not object'.
I`m using ASP.NET.
It is code of webform
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="TestTree.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link rel="stylesheet" type="text/css" href="js/resources/css/ext-all.css" />
<!-- GC -->
<script type="text/javascript" src="js/ext-all.js"></script>
<style type="text/css">
#tree, #tree2 {
float: left;
margin: 20px;
}
</style>
<script type="text/javascript" language="javascript">
Ext.require(['*']);
Ext.onReady(function () {
var store = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: 'aaa.php'
},
root: {
text: 'Ext JS',
id: 'src',
expanded: true
},
folderSort: true,
sorters: [{
property: 'text',
direction: 'ASC'
}]
});
var tree = Ext.create('Ext.tree.Panel', {
id: 'tree',
store: store,
width: 250,
height: 300,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true
}
},
renderTo: 'ftree'
});
var store2 = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: 'aaa.php'
},
root: {
text: 'Custom Ext JS',
id: 'src',
expanded: true,
children: []
},
folderSort: true,
sorters: [{
property: 'text',
direction: 'ASC'
}]
});
var tree2 = Ext.create('Ext.tree.Panel', {
id: 'tree2',
width: 250,
height: 300,
store: store2,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true
}
},
renderTo: 'ftree'
});
});
</script>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"><div id="ftree" /></asp:PlaceHolder>
</asp:Content>
File `aaa.php` is copy of file 'get-nodes.php' from example. Can you explain me, where is error and how to fix it?
I am trying to use example from Drag and Drop betweens two TreePanels (http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/tree/two-trees.html), but it isn`t working good. When I try to expand folders or drag, I receive error that 'internalId' is null or not object'.
I`m using ASP.NET.
It is code of webform
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="TestTree.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<link rel="stylesheet" type="text/css" href="js/resources/css/ext-all.css" />
<!-- GC -->
<script type="text/javascript" src="js/ext-all.js"></script>
<style type="text/css">
#tree, #tree2 {
float: left;
margin: 20px;
}
</style>
<script type="text/javascript" language="javascript">
Ext.require(['*']);
Ext.onReady(function () {
var store = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: 'aaa.php'
},
root: {
text: 'Ext JS',
id: 'src',
expanded: true
},
folderSort: true,
sorters: [{
property: 'text',
direction: 'ASC'
}]
});
var tree = Ext.create('Ext.tree.Panel', {
id: 'tree',
store: store,
width: 250,
height: 300,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true
}
},
renderTo: 'ftree'
});
var store2 = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: 'aaa.php'
},
root: {
text: 'Custom Ext JS',
id: 'src',
expanded: true,
children: []
},
folderSort: true,
sorters: [{
property: 'text',
direction: 'ASC'
}]
});
var tree2 = Ext.create('Ext.tree.Panel', {
id: 'tree2',
width: 250,
height: 300,
store: store2,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
appendOnly: true
}
},
renderTo: 'ftree'
});
});
</script>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"><div id="ftree" /></asp:PlaceHolder>
</asp:Content>
File `aaa.php` is copy of file 'get-nodes.php' from example. Can you explain me, where is error and how to fix it?