This is a migrated thread and some comments may be shown as answers.

RadTreeView click issue

5 Answers 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lili
Top achievements
Rank 1
Lili asked on 26 Jun 2013, 06:03 PM
 
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.

5 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 01 Jul 2013, 11:50 AM
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.
0
Lili
Top achievements
Rank 1
answered on 02 Jul 2013, 12:22 AM
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
0
Lili
Top achievements
Rank 1
answered on 02 Jul 2013, 12:26 AM
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
0
Nencho
Telerik team
answered on 04 Jul 2013, 11:08 AM
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.
0
Lili
Top achievements
Rank 1
answered on 09 Jul 2013, 01:56 AM
Thanks!
Tags
General Discussions
Asked by
Lili
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Lili
Top achievements
Rank 1
Share this question
or