Create your own server control based on RadWebControl

4 posts, 0 answers
  1. Ole Oscar
    Ole Oscar avatar
    18 posts
    Member since:
    Jun 2008

    Posted 10 Dec 2013 Link to this post

    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
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4614 posts

    Posted 12 Dec 2013 Link to this post

    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.
  3. Ole Oscar
    Ole Oscar avatar
    18 posts
    Member since:
    Jun 2008

    Posted 15 Jan 2014 Link to this post


    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
  4. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 16 Jan 2014 Link to this post

    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.
Back to Top