Welcome Guest Search | Active Topics | Sign In | Register

TreeView with ItemPopulate and CustomItem Options
vu.anh.nguyen
Posted: Wednesday, February 11, 2009 1:06:21 PM
Rank: Member
Groups: Member

Joined: 8/30/2007
Posts: 11
I'm trying to create a treeview that I populate dynamically using a datatable, and then itempopulate once user clicks on a node. I can do all that ok, but if I try to add a subgroup node that is a customitem by setting the "customitemid", I get a runtime error. Please see code below:

treeview code:
<eo:TreeView ID="COMBOTREE" runat="server" ControlSkinID="None" AutoCheckParent="True" AutoCheckChildren="true" AutoUncheckChildren="True" SaveStateCrossPages="True" >
<LookNodes>
<eo:TreeNode 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;"
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">
</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;">
</TopGroup>
<CheckBoxImages Margin="3" Visible="True" />
</eo:TreeView>
<eo:CustomItem ID="FileAccessItem" runat="server">
<asp:RadioButtonList ID="FileAccessType" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Selected="True" Value="READ">Read Only</asp:ListItem>
<asp:ListItem Value="READWRITE">Read/Write</asp:ListItem>
</asp:RadioButtonList>
</eo:CustomItem>

Code Behind for item populate:
nNode = New EO.Web.TreeNode
nNode.Text = dt.Rows(i)("SHARE_NAME").ToString.ToUpper
nNode.Value = dt.Rows(i)("ID")
cNode = New EO.Web.TreeNode
cNode.CustomItemID = "FileAccessItem"
nNode.SubGroup.Nodes.Add(cNode)
ServerNode.SubGroup.Nodes.Add(nNode)
parentNode.SubGroup.Nodes.Add(ServerNode)

Error Message:
'this.avm' is null or not an object

If I comment out the customitemid line then everything works fine.
eo_support
Posted: Wednesday, February 11, 2009 1:32:39 PM
Rank: Administration
Groups: Administration

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

I do not believe you can use CustomItem with populate on demand. They won't work together. If you want to have custom contents in your TreeNode, you can format the TreeNode's Text property to include appropriate HTML text.

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.