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

RibbonBarButtonClickEventArgs not populated on ButtonClick

1 Answer 39 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 04 Sep 2011, 12:38 PM
I have 5 tabs, the last 2 tabs are hidden when the page loads for first use, call these Tab3 and Tab4.  When a user clicks on a button from Tab0, the ButtonClick event fires, and RibbonBarButtonClickEventArgs is populated.  This same code then hides Tab0, Tab1 and Tab2, while then making Tab3 and Tab4 visible.  The user does there thing, then clicks a button from Tab3 to save their data, Buttonclick event fires, but this time RibbonBarButtonClickEventArgs is set to nothing, and the code dumps out as we try and determine which button was fired.

This seems like an issue because Tab0 is hidden, notice on the first ButtonClick it fires and is populated correctly.  But as soon as that Tab (Tab0) is hidden it breaks.

We tried just enabling and disabling each tab, problem is that disabling a tab doesn't seem to stop a user from clicking on it, so then you have also disable the group, but get the ugly X graphic.  But our preferred method is just to dynamically hide the tabs that the user simply doesn't need to see.

Ideas?

Cam.

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 07 Sep 2011, 04:09 PM
Hello Sean,

In general when you disable a button the image that you see (the x sign) is the default one. However, you could change it to any other by simply using the DisabledImageUrl property. Since the RadRibbonBar is relatively new control there are still features that are not implemented yet and disabling a RibbonBarTab is one of them. I already logged that for future implementation and our development team will do their best to implement it for the Q3 release of the controls.

Considering your first question: Buttonclick event fires, but this time RibbonBarButtonClickEventArgs is set to nothing, and the code dumps out as we try and determine which button was fired
Can you provide more details on how we could reproduce the issue? For example some code snippet of how you determine which button is clicked? Since you can not attach files to forum posts you could also open a support ticket and send us a simplified runnable project where we can inspect the issue locally and come back to you with a suitable solution.

Regards,
Kate
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
RibbonBar
Asked by
Sean
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or