Thank you for contacting us.
The exception you are seeing is due to inappropriate cast. When trying to cast the sender as a RadButton the cast fails and returns null, which causes the exception. The right cast in this situation would be to RadButtonElement. Also it's always good to check for null values if possible in order to prevent such exceptions. Please take a look at the code below.
RadButtonElement = TryCast(sender, RadButtonElement)
I hope this helps.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>