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

Inheriting from RadTreeView

1 Answer 52 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
xrimson
Top achievements
Rank 1
xrimson asked on 06 Feb 2012, 09:14 PM
Are there any examples out there on how to inherit from RadTreeView?  I want override both the server side component AND the client side AJAX component.

I can easily override the server side component, but the problem being that both RadTreeView & MyTreeView has their own AJAX component and I am running into problems when radTreeView fires onCollapsed, the variables initialized in MyTreeView AJAX component are null.

So I really would like to have myTreeView AJAX component inherit from the RadTreeView AJAX component.  After inheriting from RadTreeVIew is there a way to turn off the AJAX component and just use the inherited one from MyTreeView?

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 13 Feb 2012, 12:02 PM
Hi xrimson,

You can disable all scripts of a RadControl for ASP.NET AJAX by setting its EnableEmbeddedScripts property to false and use your custom JavaScript code, however it is advisable that you do not do this because you will have to implement from scratch every functionality you need.

It's easier to build on top of RadTreeView's client-side component in your inherited TreeView. You can register the additional JavaScript files with the ClientScriptResourceAttribute (type-level) in this way:
[ClientScriptResource("AssemblyName", "ScriptResourcePath.js")]

I hope this helps.

Kind regards,
Simon
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
TreeView
Asked by
xrimson
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or