How to sub-class a RadSplitButton

0 Answers 97 Views
Buttons
Avrohom
Top achievements
Rank 1
Iron
Iron
Avrohom asked on 03 Jan 2022, 05:59 PM | edited on 03 Jan 2022, 05:59 PM

Hi,

I have tried sub-classing a RadSplitButton. But no functionalities is being inherited from the original button. So, there is no dropdown content showing (popup) when clicking on the dropdown button, Command gets not executed and so on.

Any suggestion on how to properly base a custom control on this Split button, please?

Stenly
Telerik team
commented on 05 Jan 2022, 03:33 PM

Hello Avrohom,

I have prepared a sample project, in order to test the specified behavior, however, creating a custom class that derives from the RadSplitButton class works correctly on my end. Also, this article contains useful information about extending existing controls. With that said, I have attached the mentioned project, so, could you give it a try and let me know if I am missing something?

Regards,
Stenly
Progress Telerik

Avrohom
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2022, 05:02 PM

Many thanks Stenly,

I have realised what the problem was. It was that I have overridden the OnApplyTemplate Method without calling base.OnApplyTemplate. It works now perfectly OK.


No answers yet. Maybe you can help?

Tags
Buttons
Asked by
Avrohom
Top achievements
Rank 1
Iron
Iron
Share this question
or