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

The problem of Treeview for RadControls for WinForm Q3 2009

3 Answers 83 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Mars
Top achievements
Rank 2
Mars asked on 09 Dec 2009, 02:34 AM
Hello,

We met a probelm about the RadTreeNode Class of Treeview,

We find that the MouseDown Event of RadTreeNode Class disappear now and other Events such as NodeCollapsed,NodeExpanded also disappear besides only the PropertyChanged Event in RadTreeNode Class,

For example:
childnode = new RadTreeNode("child");
childnode.MouseDown += 
new MouseEventHandler(node_MouseDown);

The code as above is work OK in RadControls for WinForm Q2 2009,but it'll occur error message when compile these codes for WinForm Q3 2009,

The error message show "Telerik.WinControls.UI.RadTreeNode' is not include the Definition of 'MouseDown'..."

This problem have led to some functions can't work of our software now.

We need your help to resolve this problem ASAP.

Best Regards.

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 09 Dec 2009, 08:52 AM
Hello Victor Wang,

MouseDown event for RadTreeNode had been marked as obsolete for several releases. The warnings that the compiler generates indicate that RadTreeView NodeMouseDown event should be used instead. For example:

treeView.NodeMouseDown += new RadTreeView.TreeViewMouseEventHandler(tv_NodeMouseDown);

Write again if you need further assistance.

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mars
Top achievements
Rank 2
answered on 09 Dec 2009, 10:09 AM
Hi Victor,

I think that you misunderstood what I mean,

the problem is the RadTreeNode Class of the RadTreeView control,

we need the MouseDown event to trigger our founction,but we can't find this event in RadTreeNode Class

in the latest version of WinForm Q3 2009,

The function what we want is that user use mouse button to click the child node of radTreeView,

then it'll trigger the MouseDown event of the child node and call the custom event function

what we created to get the data and show the data in the RadGridVuew.

this is a urgent case,I hope you can uderstand what I mean,

another,I suggest that you can try to compare WinForm Q2 2009 with WinForm Q3 2009 for this issue,then you'll understand what I mean more easier.

Best Regards.
0
Victor
Telerik team
answered on 09 Dec 2009, 11:39 AM
Hi Victor,

This is exactly what I meant. MouseDown event of RadTreeNode is marked as obsolete since 2008. Being marked as obsolete means that after a few releases it will be deleted. Obsolete members and classes generate compiler warnings which must be noted by the developers using the obsolete objects.

You can use RadTreeView NodeMouseDown event to obtain the exact same information about the clicked node. The event of RadTreeVIew provides a single centralized event which relieves developers from the burden of subscribing multiple times to the same event of different nodes.

If you consider it necessary, please provide some of your code which does not work and I will help you to migrate to the new event.

I am looking forward to your reply.

Kind regards,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Treeview
Asked by
Mars
Top achievements
Rank 2
Answers by
Victor
Telerik team
Mars
Top achievements
Rank 2
Share this question
or