Welcome Guest Search | Active Topics | Sign In | Register

treeview itemclick event in old version Options
Richard
Posted: Thursday, March 5, 2009 11:18:06 AM
Rank: Member
Groups: Member

Joined: 1/20/2009
Posts: 11
I have downloaded your latest version to implement a treeview with itemclick server event, everything works fine. But the problem is we have purchased your old version (eo.web.dll 3.1.18.2) and installed it in several servers. It will be hard for us to reinstall your new versions. In the old version, after clicking a tree node, sever side event (page load) does fire up, but the itemclick event doesn't. Would you please help me to find a solution?

Richard
Posted: Thursday, March 5, 2009 11:21:43 AM
Rank: Member
Groups: Member

Joined: 1/20/2009
Posts: 11
Code: Visual Basic.NET
<eo:TreeView ID="TreeViewVideo" runat="server" Height="250px" Width="400px" ControlSkinID="None"
                        RaisesServerEvent="true" AutoExpandOnClick="false" >
                        <LookNodes>
                            <eo:TreeNode CollapsedImageUrl="00030201" 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="00030202" ImageUrl="00030203" 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 Text="Video Online Tutorial" Value=""></eo:TreeNode>
                            </Nodes>
                        </TopGroup>
                    </eo:TreeView>


Code: Visual Basic.NET
Protected Sub TreeViewVideo_ItemPopulate(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles TreeViewVideo.ItemPopulate
      ' delete some codes
            treeNode.RaisesServerEvent = EO.Web.NullableBool.True
      ' delete some codes
    End Sub

    Protected Sub TreeViewVideo_ItemClick(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles TreeViewVideo.ItemClick

    ' do not stop here in debug mode
    End Sub
eo_support
Posted: Thursday, March 5, 2009 11:33:51 AM
Rank: Administration
Groups: Administration

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

I believe if you set AutoExpandOnClick to true and RaisesServerEvent to false, it would fire ItemPopulate event but not ItemClick event.

Thanks!
Richard
Posted: Thursday, March 5, 2009 11:40:49 AM
Rank: Member
Groups: Member

Joined: 1/20/2009
Posts: 11
ItemPopulate event works fine and it does generate subnodes as expected. The problem is I want itemclick sub to be called if end user click subnodes. But looks like TreeViewVideo_ItemClick doesn't fire up.

Anyway to trigger itemclick event?
eo_support
Posted: Thursday, March 5, 2009 11:54:20 AM
Rank: Administration
Groups: Administration

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

That's exactly how the new version works. However I do not believe there is implemented in the old version though. So there doesn't seem to be a simple way to do that in the old version. Sorry about that!

Thanks!
Richard
Posted: Thursday, March 5, 2009 12:07:18 PM
Rank: Member
Groups: Member

Joined: 1/20/2009
Posts: 11
it is hard for me to believe the old version has no way to fire sever event while end users click it is end notes. I think that is pretty basic function. Do you have document for that old version?
eo_support
Posted: Thursday, March 5, 2009 12:18:15 PM
Rank: Administration
Groups: Administration

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

That is not accurate. The old version fires user click event when the node is not being populated. But I think it might regard populate on demand and item click as either or, that's why when you have ItemPopulated fired, your ItemClick event will not fire. I would hardly believe this clearly documented anywhere, but that's probably beside the point because regardless whether it's documented or not, it will not help you to resolve the issue.

Thanks
Richard
Posted: Thursday, March 5, 2009 2:30:09 PM
Rank: Member
Groups: Member

Joined: 1/20/2009
Posts: 11
Thanks, I disabled popoulate on demand and item click did fire up. Got a new question hope you could help. I have 3 nodes (A, B, C) on the root, each notes have 5 sub-nodes (A1,A2.. A5 and B1, B2...), After I expend node A (B,C is still collapsed) and click A2, item click fired up, but while page is reloaded, all nodes (A, B, C) became expanded (I was hoping that A should be expanded but B,C should keep their original states which is collapsed). Anyway to reserve their original states? Because in our project, there are thousand nodes, if all expanded, hard to navigate.

Thanks.
eo_support
Posted: Thursday, March 5, 2009 2:51:07 PM
Rank: Administration
Groups: Administration

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

We are not aware of such problem even in an old version. The TreeView supposes to keep its state, so you might want to try it in a blank test page to see if it has anything to do with other contents/code in your page. In any case, you might want to consider switching to the new version (there is a cost involved since your version is rather old) because all bug fixes will be done base on the current version. Another issue is that the one year support period on your purchase has long expired, so there isn't much our support will be able to do for you, especially consider no new build for your version will be made. We won't mind to give you a few pointers, but that may just be about it.

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.