RadTreeView click issue

6 posts, 0 answers
  1. Lili
    Lili avatar
    18 posts
    Member since:
    Jun 2012

    Posted 26 Jun 2013 Link to this post

     
    Hellow,
    We are working with RadTabStrip for RadMultiPage. There are three userControls A, B and C for each RadPageView as PageViewA, PageViewB and PageViewC. UserContol B and C are put in userControl A when page load. I have a button in userControl A, click it go to PageViewC which has a RadOrgChart and RadTreeView for list customers.
    (Due to RadOrgChart not fire Click event, So we add radTreeView can be clicked). We need to click Treeview node, then let PageViewA be selected(e.g. let PageViewA tab selected as active tab). Now the problem is after click any Treeview node, it always keep in PageViewC tab afte postback. We have OnNodeClick="RadTreeView1_NodeClick" for RadTreeView and sub as below:
      
    Protected Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick
    Dim rpv As RadPageView = CType(UserControlA.FindControl("PageViewA "), RadPageView)
    rpv.Selected = True 
    End Sub
      
    Please advise, how to do the PageViewA tab can be selected after click a treeview node on PageViewC
      
    Thanks in advance.
  2. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 01 Jul 2013 Link to this post

    Hello Joe,

    I would suggest you to handle the NodeClick event of the RadTreeView a bit differently. You should find the desired RadTab and PageView and set them as selected. I had prepared a sample project for you, implementing the desired functionality. In addition, here is a video, demonstrating the behavior at my end. Please correct me if I had misunderstood your scenario.

    Note : dll files are removed from the attachment, due to a file upload limit.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Lili
    Lili avatar
    18 posts
    Member since:
    Jun 2012

    Posted 01 Jul 2013 Link to this post

    Thanks very much Nencho. You are great.
    BTW,  Add click event handle in serve side to RadorgChart  doen't work. (It doesn't fire imagebutton_Onclick). I want to get a node DataFieldID when click. Do you have any good idera? 
    If  use JQuery, It can only get each node index by using code: hierarchicalIndex = orgChart._getRealHierarchicalIndex(hierarchicalIndex); Do you know how can get DataFieldID which is to identify  a node in client side?

    Thanks in advance.
    Joe
  4. Lili
    Lili avatar
    18 posts
    Member since:
    Jun 2012

    Posted 01 Jul 2013 Link to this post

    Thanks very much Nencho. You are great.
    BTW,  Add click event handle in serve side to RadorgChart  doen't work. (It doesn't fire imagebutton_Onclick). I want to get a node DataFieldID when click. Do you have any good idea? 
    If  use JQuery, It can only get each node index by using code: hierarchicalIndex = orgChart._getRealHierarchicalIndex(hierarchicalIndex); Do you know how can get DataFieldID which is to identify  a node in client side?

    Thanks in advance.
    Joe
  5. Nencho
    Admin
    Nencho avatar
    1871 posts

    Posted 04 Jul 2013 Link to this post

    Hello Joe,

    You could easily hook a click event of the Image, using JQuery and the following approach:
    function pageLoad() {
           $telerik.$(".rocImageWrap").on("click", function e() { alert("Image clicked;") })
       }

    Unfortunately, the DataFieldID property is not accessible at client-side, since it is exposed only at server-side.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Lili
    Lili avatar
    18 posts
    Member since:
    Jun 2012

    Posted 08 Jul 2013 Link to this post

    Thanks!
Back to Top