Hi,
The following code simply add the client node into the current selected node and opens it for editing...
newnode.scrollIntoView();
newnode.edit(); //open it for editing
My tree view is quite huge and is binded to DB.
The problem here is that when I am doing this the scrollintoview doesn't seems to work and becuase of that the new node is hidden from the user, user has to scroll down to see if the node is created and then they have to edit it again.
The Tree view decleration is given below
<ignav:UltraWebTree SingleBranchExpand="True" ID="UWTReports" runat="server" AllowDrag="True" AllowDrop="True" DefaultImage="" HiliteClass="" HoverClass="" Indentation="20" StyleSetName="Default" Width="350px" Height="200px" Editable="true" OnNodeChanged="UWTReports_NodeChanged" ExpandOnClick="true" OnNodeDropped="UWTReports_NodeDropped" OnNodeAdded="UWTReports_NodeAdded" BorderWidth="1px" BorderColor="#CCCCCC" BorderStyle="Solid"> <ClientSideEvents Drag="" InitializeTree="Reports_Init" DragStart="DragStart" Drop="Drop" NodeClick="ReportNodeClick" AfterNodeUpdate="ReportNodeUpdate" /> </ignav:UltraWebTree>
Hello!
I tried your sample in version 2008.2 with the last patch installed... And it worked fine!
Wich version do you have?
Bye,
Carlos Marcão
Thanks for the reply, I am using VS 2008 I also installed the new hotfix now my project is using 8.2.20082.2022 version of infragistics, but still I am getting the same issue. Please see the screen shot @ http://cid-a9e1bb1d76e834f9.skydrive.live.com/self.aspx/Public/igtree.jpg?lc=1033
When I click the Add new folder button (when PIReport node is selected) it is creating a node at the end but not scrolling to that location automatically.
Thanks
Bhupinder
Hi!
I created a sample that works fine:
---
<%@ Register tagprefix="ignav" namespace="Infragistics.WebUI.UltraWebNavigator" Assembly="Infragistics35.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.2022, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %>
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<script type="text/jscript">
var oTree = igtree_getTreeById('UltraWebTree1');
oNode = oNode.addChild("New Folder");
oNode.scrollIntoView();
oNode.edit(); //open it for editing
}
</script>
AllowDrag="True" AllowDrop="True"
Indentation="20" StyleSetName="Default"
Editable="True" ExpandOnClick="True"
BorderColor="#CCCCCC" BorderStyle="Solid"
DataKeyOnClient="True" HiliteClass="">
<ClientSideEvents Drag="" />
<Levels>
<ignav:Level Index="0" />
</Levels>
<Nodes>
<ignav:Node Text="Root Node">
<ignav:Node Text="Child Node">
</ignav:Node>
</Nodes>
</ignav:UltraWebTree>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="BLOCKED SCRIPTButtonClicked(); return false;"/>
</form>
<script type="text/C#" runat="server">
{
UltraWebTree1.Nodes[0].Expand(true);
----
Try to remove from your code the glbselectednode.setExpanded(true);
It seems to be causign the problem... Try to expand that node at server side (only to check)... if it works... Maybe you got an Infragistics bug... :)
Thanks for your help. I tried to remove the glbselectednode.setexpanded(true) it appeared to work fine in the beginning but when I collapse the node and try to create a node under the collapsed node it does'nt work and the ndoe is created under the hidden area. I did the following too in the JS this insures that when my node is in colapsed state it is expanded and the node is added then (without this it will give JS error) but it doesn't work.
if (glbselectednode.getExpanded() != true)
{glbselectednode.setExpanded(true);
not to mention i also included the server side code also.
Thanks again
Hi again.
ExpandAnimation="None"
(I turned off the animations) and it seems to work fine now, even when using :
aquele é ele...(hope this is correct portuguese :))..
setting the expandanimation to none worked...Thanks allot.