Welcome Guest Search | Active Topics | Sign In | Register

populate on demand gets triggered again and again after postback Options
Jhon s
Posted: Sunday, October 14, 2007 3:41:40 AM
Rank: Advanced Member
Groups: Member

Joined: 5/31/2007
Posts: 36
every time i post back the item gets populated and creating new level of nodes (when the populate on demand = false)

please look at this example

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<eo:treeview id="TreeView1" raisesserverevent="true" runat="server" height="250px" width="200px" controlskinid="None">
<looknodes>
<eo:treenode collapsedimageurl="00030301" disabledstyle-csstext="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
expandedimageurl="00030302" imageurl="00030301" itemid="_Default" normalstyle-csstext="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none"
selectedstyle-csstext="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
</eo:treenode>
</looknodes>
<topgroup style-csstext="border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;">
<nodes>
<eo:treenode imageurl="00030303" populateondemand="True" text="Main Node">
</eo:treenode>
</nodes>
</topgroup>
</eo:treeview>
</form>
</body>
</html>





Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub TreeView1_ItemPopulate(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles TreeView1.ItemPopulate
Dim node As New EO.Web.TreeNode
node.Text = "New Node"
node.PopulateOnDemand = False
e.TreeNode.ChildNodes.Add(node)
End Sub
End Class
eo_support
Posted: Sunday, October 14, 2007 7:38:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Ilan,

This should be normal. What you see is not a "fresh" populate on demand, but a "replay" of a previous populate on demand. Our TreeView logs all populate on demand triggered on the client and replay them when the page postbacks. This way the TreeView will be the same as last seen on the client. Otherwise your server side code won't see nodes populated through populate on demand.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.