Welcome Guest Search | Active Topics | Sign In | Register

Click Event for Image Root Options
Peymaneh
Posted: Tuesday, September 18, 2007 7:16:39 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
Hi,
I am using tree view and try to catch expand and collapse event by onclick event. It seems some how when I try to add image for collapse and expand for a node then I lose my click event for that node. Please let me know how can I have both (image for collapse and expand as well as click invent handling). I already set RaisesServerEvent to true but after adding emage it doesn’t rase event my html code is like this:

<eo:TreeView ID="TreeView1" runat="server" ControlSkinID="None" ClientSideOnItemClick="Select_Change" AutoScroll="False">
<LookNodes>
<eo:TreeNode DisabledStyle-CssText=""
ItemID="_TopLevelItem" NormalStyle-CssText=""
SelectedStyle-CssText="">
<SubGroup Style-CssClass="programmenunodetop" Style-CssText="">
</SubGroup>
</eo:TreeNode>
<eo:TreeNode
ItemID="_Default" NormalStyle-CssClass="programmenudefault"
SelectedStyle-CssClass="programmenunodeselect" HoverStyle-CssClass="programmenunodehover">
<SubGroup Style-CssText="">
</SubGroup>
</eo:TreeNode>
</LookNodes>
<Margin Width="0" />
<TopGroup Style-CssClass="programtreeview">
<Nodes>
<eo:TreeNode CollapsedImageUrl="~/imgs/program/LeftNavMilestone1.JPG" ExpandedImageUrl="~/imgs/program/LeftNavMilestone1_1.JPG"
ShowCheckBox="False" RaisesServerEvent="True" OnClickScript="Select_Change" PopulateOnDemand="True">
<SubGroup>
<Nodes>
<eo:TreeNode Text="Calendar" RaisesServerEvent="True">

</eo:TreeNode>
<eo:TreeNode Text="Contacts" RaisesServerEvent="True">
</eo:TreeNode>
</Nodes>
</SubGroup>
</eo:TreeNode>
<eo:TreeNode RaisesServerEvent="True" ShowCheckBox="False" CollapsedImageUrl="~/imgs/program/LeftNavMilestone1.JPG" ExpandedImageUrl="~/imgs/program/LeftNavMilestone1_1.JPG">
<SubGroup>
<Nodes>
<eo:TreeNode ImageUrl="00030408" Text="Inbox">
</eo:TreeNode>
</Nodes>
</SubGroup>
</eo:TreeNode>
</Nodes>
</TopGroup>
<LineImages Visible="False" />
</eo:TreeView>

thanks
eo_support
Posted: Tuesday, September 18, 2007 8:01:52 AM
Rank: Administration
Groups: Administration

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

Expand/Collapse a node does not account to a "click" on the node. That's why when you click the image to expand/collapse the node, Select_Change is not fired.

In order to track expand/collapse, you need to handle ClientSideOnGroupExpand and ClientSideOnGroupCollapsed instead.

RaisesServerEvent is irrelevant in this case.

Thanks
Peymaneh
Posted: Tuesday, September 18, 2007 8:36:09 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
i set the tree view ClientSideOnGroupCollapsed property to "Select_Change"
and then in code behind i put this code and put breakpoint on it but it never meet the break point

Sub Select_Change(ByVal item As EO.Web.MenuItem)
If item.Selected = True Then
item.Expanded = True
End If
End Sub
eo_support
Posted: Tuesday, September 18, 2007 8:39:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
It has nothing to do with code behind. Those are client side events. They can only be handled on the client side by JavaScript.


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.