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

Create your own server control based on RadWebControl

3 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ole Oscar
Top achievements
Rank 1
Ole Oscar asked on 10 Dec 2013, 10:29 AM
Hi,
We use the Telerik controls a lot and like the architecture. We need to create some controls and want to use your RadWebControl as base.
What is the easiest way to implement the JavaScript/ClientAPI and skinning. Do you have any examples or some documentation on it.
You have a class called SkinRegistrar. Is this the one to use ?

Regards
Ole Oscar Johnsen

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Dec 2013, 12:50 PM
Hi Ole,

Things are a lot more complex than just inheriting a class. Our controls are IScriptControls and I advise that you examine some tutorials in the net to see how this is done. You can then download the source code from your account and examine how things are implemented with us, in order to get some ideas for your own code. You can examine the SkinRegistrar class to see how we determine the value of the current skin so we can build the needed request for the respective stylesheet.
Here are two example tutorials:
- http://msdn.microsoft.com/en-us/library/bb386450(VS.100).aspx
- http://tutorials.csharp-online.net/Creating_Custom_ASP.NET_AJAX_Client_Controls—IScriptControl.GetScriptDescriptors_Method

Regards,
Marin Bratanov
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
Ole Oscar
Top achievements
Rank 1
answered on 15 Jan 2014, 08:56 AM

Many tanks for the reply.
We have found the way to do it with your components and we want to use inheritance not only from the RadWebControl but also from RadGrid +++ to help us to remove many of the maintenance problems we have discovered over the years using declarative syntax + user controls. 95% of the time we need to inherit from your high level controls.

Everything works fine using inheritance from RadGrid and RadWebControl and so on, but I discovered a bug in your SkinRegistrar class and when I open up a support ticket on it, I was strongly recommended not to inherit from any of your controls.
We develop multiple in house/external facing applications and some of them have used Telerik, and others have used other solutions. One of the projects that we have started is to have a library of server controls that supports specific common scenario's that also includes common embedded skinning and client/server functionality.

Telerik was on the top of our wish-list before your support team warned us of not using inheritance from your controls. So now we are looking for alternatives.

I myself can't understand why you don't support inheritance from your controls.

Regards
Ole Oscar Johnsen
0
Genady Sergeev
Telerik team
answered on 16 Jan 2014, 04:53 PM
Hello Ole,

The main reason we don't recommend inheriting is that there are simply too many factors that one should be aware of in order to have a success. Further, we can hardly provide support if something go wrong because:

- we cannot be aware of the implications this will bring in the functionality
- we do not know whether modifications will not break something else
- we do not know their purpose and the business need they take care of

This does not mean, however, that the controls cannot be inherited or that it is a bad practice. It is just somewhat more complex and the developers should be aware of this. Actually it might be a good idea that we provide a help topic covering in more details common pitfalls.

On your other thread that began as a bug report - I have brought it to the attention of our technical leads for examination. I suggest communication on that matter continues there.

Regards,
Genady Sergeev
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.
Tags
General Discussions
Asked by
Ole Oscar
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Ole Oscar
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or