Creating a derived server control

4 posts, 0 answers
  1. Thomas
    Thomas avatar
    143 posts
    Member since:
    Feb 2007

    Posted 04 Apr 2008 Link to this post

    I have a RadComboBox control with some special logic in its ItemsRequested event. I would like to encapsulate this logic into a server control that I can reuse within my solution. If I simply derive from RadCombBox and wire up this event my custom logic, it clearly does not work as the ItemsRequested event never fires. How would I go about solving this one?
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 07 Apr 2008 Link to this post

    Hello Thomas,

    I suggest that you use a user control containing RadComboBox. You can handle the ItemsRequested event and implement there your custom logic.

    Please find attached a simple project for a reference.

    If this does not help you, please open a support ticket and send us your project to test it locally.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thomas
    Thomas avatar
    143 posts
    Member since:
    Feb 2007

    Posted 07 Apr 2008 Link to this post

    Actually, I was in the process of going down the road of creating a UserControl and that works dandy except when I want to use validators (outside the UserControl). If I use a UserControl, I believe I can only use a CustomValidator which is why I was investigating a server control.
  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 09 Apr 2008 Link to this post

    Hello Thomas,

    I understand the problem.

    Please find attached the latest internal build and use it in your custom control. With it, you can override RaiseCallBackEvent method and implement your custom logic for adding items there.

    Please find attached a simple and running project illustrating the approach.

    Hope this helps.

    Regards,
    Rosi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top