Home - Forums-.NET - FlyTreeView (ASP.NET) - Mouse click to select a node [solved]

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Mouse click to select a node [solved]
Link Posted: 16-Nov-2011 10:22

I am testing this to replace the vs2010 treeview that bogs down terribly when placed inside an updatepanel.
I have a treeview that has categories of reports, the categories can have unlimited subcategories, yadda yadda, the populate nodes on demand works fine, all sub items are displayed.

The issue I am having is if I use the mouse to click a report node (so has no children); no postback happens. If I use the arrow keys and press enter on a report node; the postback fires and everything works as expected.

The update panel trigger events have the treeview's selectednodechanged event set. via:

   asp:AsyncPostBackTrigger ControlID="btnLogin" EventName="Click" /
   asp:AsyncPostBackTrigger ControlID="trvReports" EventName="SelectedNodeChanged" /
   asp:AsyncPostBackTrigger ControlID="btnPreview" EventName="Click" /
   asp:AsyncPostBackTrigger ControlID="btnPrint" EventName="Click" /
   asp:AsyncPostBackTrigger ControlID="btnLogout" EventName="Click" /
   asp:AsyncPostBackTrigger ControlID="btnRunExport" EventName="Click" /

*** I removed the greater than and less than characters because the section above we being stripped from the post.

here is the code I need to run when a node that contains a report is selected.

Protected Sub trvReports_SelectedNodeChanged(sender As Object, e As NineRays.WebControls.SelectedNodeChangedEventArgs) Handles trvReports.SelectedNodeChanged
  Dim db As New ReportPortalDBDataContext
        Dim ReportID As Int16 = e.Node.Value.Split("|")(1)


        txtReportID.Value = ReportID

End Sub

any ideas???

Thank you for any guidance you can give
Link Posted: 17-Nov-2011 05:20
I forgot to mention that I do have PostBackOnSelect="True" selected as well.
Link Posted: 17-Nov-2011 06:06
I found what I was doing wrong; I had selected SelectNodeOnRightClick = False. That was stopping select on left click as well. I removed that and it is working fine.