Hover-over popup on radtreeview node populated from ajax call?

2 posts, 0 answers
  1. Phil
    Phil avatar
    1 posts
    Member since:
    Jun 2014

    Posted 11 Jun 2014 Link to this post

    Hi, 

    I have been poking around on the forums and doing some soul-googling about this, but have not found any examples that hit the mark. 

    I am displaying some data in a RadTreeView. For some, but not all, of the nodes, I want to have a popup on mouse-over that will display some summary data. I want the data to be populated at run time from an ajax call to the server to avoid bloating the get payload whenever the tree is populated.

    I am not sure whether I need to use a window to do this -- these look a bit more heavy weight than what I need. This just needs to be a simple panel that comes up and that can be dismissed from a cancel button. 

    I would be grateful for any suggestions you can offer. Thanks. 
    --Phil 

  2. Plamen
    Admin
    Plamen avatar
    3036 posts

    Posted 16 Jun 2014 Link to this post

    Hi Phil,

    You can handle OnClientMouseOver client event of RadTreeView and use it as in the code below to trigger you custom ajax call:
    <script type="text/javascript">
     
               function OnClientMouseOver(sender, args) {
                   if (args.get_node().get_text() == "text2") {
                       //.. your ajax call
                   }
               }
     
           </script>
       <div>
           <telerik:RadTreeView runat="server" OnClientMouseOver="OnClientMouseOver" >
               <Nodes>
                   <telerik:RadTreeNode Text="text1"></telerik:RadTreeNode>
                   <telerik:RadTreeNode Text="text2"></telerik:RadTreeNode>
                   <telerik:RadTreeNode Text="text3"></telerik:RadTreeNode>
                   <telerik:RadTreeNode Text="text4"></telerik:RadTreeNode>
     
               </Nodes>
           </telerik:RadTreeView>
       </div>

    As for the second questions -you can sue the lightweight render mode  RadWindow that should fit your requirements.

    Hope this information will be helpful.


    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top