PDA

View Full Version : [CLOSED] Tree Editor does not work



jesperhp
Feb 12, 2014, 9:59 AM
Hi
On right click to tree, display menu and the from menu I can insert another node to treepanel in v1.1 but now displayed menu on right click on node of tree but editor does now work, image displayed and editor area disabled and could not insert text to tree editor




<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register Src="../Shared/Controls_Store/store_Location.ascx" TagName="store_Location"
TagPrefix="uc1" %>
<script runat="server">

protected void Page_Load(object sender, EventArgs e)
{
if (InfoHelpDeskWebApp.Models.User.IsLoggedinUserAdmi nistrator())
{
this.TreePanel1.Enable(true);
}
}

</script>
<ext:Menu ID="TreeContextMenu" runat="server" EnableScrolling="false">
<Items>
<ext:Label ID="NodeName" runat="server" Cls="bold-text" />
<ext:MenuSeparator />
<ext:MenuItem ID="MenuItem4" runat="server" Text="<%$ Resources:HelpDeskWebApp,InsertChild%>"
Icon="ArrowRight">
<Listeners>
<Click Handler="var id = this.parentMenu.dataRecord;#{TreePanel1}.appendChi ld(id, '');" />
</Listeners>
</ext:MenuItem>

</Items>
<Listeners>
<Show Handler="#{NodeName}.el.update(rec.data.text);" />
</Listeners>
</ext:Menu>
<script type="text/javascript" src="../../Scripts/AppScripts/Location.js"></script>
<script type="text/javascript">
var rec ;
var getRecord = function( record)
{
rec= record;
}
</script>
<ext:Viewport ID="Viewport1" runat="server" Layout="fit">
<Items>
<ext:Panel ID="PanelContent" runat="server" Layout="Fit" Region="Center" AutoScroll="true">
<Items>
<ext:TreePanel ID="TreePanel1" runat="server" UseArrows="true" AutoScroll="true"
Animate="true" EnableDD="false" Mode="Remote" RootVisible="true" AllowLeafDrop="true"
ContainerScroll="true" Title="<%$ Resources:HelpDeskWebApp,Tree%>" Border="false"
RemoteJson="true" RemoteInsertUrl="/Locations/RemoteInsert" RemoteRemoveUrl="/Locations/RemoteRemove"
RemoteRenameUrl="/Locations/RemoteRename" RemoteMoveUrl="/Locations/RemoteMove"
RemoteAppendUrl="/Locations/RemoteInsert" AutoHeight="true">
<Store>
<ext:TreeStore ID="TreeStore1" runat="server">
<Proxy>
<ext:AjaxProxy Url="/Locations/getNodes" Json="true">
<ActionMethods Read="POST" />
</ext:AjaxProxy>
</Proxy>
</ext:TreeStore>
</Store>
<Editor>
<ext:TextField ID="TextField1" runat="server" AutoShow="true" />
</Editor>
<SelectionSubmitConfig Encode="true" />
<Root>
<ext:Node NodeID="1" Text="<%$ Resources:HelpDeskWebApp,LocationName%>" />
</Root>
<Listeners>
<ItemContextMenu Handler="e.preventDefault();#{TreeContextMenu}.dataRecord = record; getRecord(record);#{TreeContextMenu}.showAt(e.getX Y());"
StopEvent="true" />
<RemoteActionRefusal Handler="Ext.Msg.alert('Error', e.message);" />
</Listeners>
</ext:TreePanel>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>




Image from v1.1
7581
7580

now image from v2.x
7582 7583

Daniil
Feb 12, 2014, 12:49 PM
Hi @jesperhp,

These examples appears to be working.
http://examples2.ext.net/#/TreePanel/Advanced/Remote_Mode/
http://examples2.ext.net/#/TreePanel/Advanced/Remote_Mode_with_Service/

I don't see this


<Plugins>
<ext:CellEditing runat="server" />
</Plugins>
in the TreePanel's configuration.

jesperhp
Feb 12, 2014, 1:50 PM
Hi @jesperhp,

These examples appears to be working.
http://examples2.ext.net/#/TreePanel/Advanced/Remote_Mode/
http://examples2.ext.net/#/TreePanel/Advanced/Remote_Mode_with_Service/

I don't see this


<Plugins>
<ext:CellEditing runat="server" />
</Plugins>
in the TreePanel's configuration.


Thanks
close it