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

Creating a derived server control

3 Answers 71 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 04 Apr 2008, 03:19 PM
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?

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 07 Apr 2008, 02:39 PM
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
0
Thomas
Top achievements
Rank 1
answered on 07 Apr 2008, 03:14 PM
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.
0
Rosi
Telerik team
answered on 09 Apr 2008, 08:53 AM
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
Tags
ComboBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or