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

RadRibbonBar client and server side events

1 Answer 161 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 02 Jun 2011, 11:41 PM
Hi,

How can I have RibbonBarButtons on the same RadRibbonBar with client and server side events.

Button ID = "Open" - client side event
Button ID =  "ChangeUser" - server side event

The problem I have is that "Open" causes a RadWindow to open on the client side via window.radopen, but when I add the server side event "onbuttonclick" it causes a postback and while the window.radopen is called the postback causes it to disappear again. I somehow need to cancel postback when the client event is handled. Is there an easy way to do this?

<telerik:RadRibbonBar ID="MainRibbon" runat="server" SelectedTabIndex="0" Skin="Windows7"
        AccessKey="O" 
        onclientbuttonclicked="ButtonClicked"
onbuttonclick="MainRibbon_ButtonClick">
        <telerik:RibbonBarTab Text="File">
            <telerik:RibbonBarGroup Text="Patients">
                <Items>
                    <telerik:RibbonBarButton Text="Open patient" Size="Large" ImageUrlLarge="../Images/Open.png" ID="Open" />
                </Items>
            </telerik:RibbonBarGroup>
            <telerik:RibbonBarGroup Text="Users">
                <Items>
                    <telerik:RibbonBarButton Text="Change user" Size="Large" ImageUrlLarge="../Images/ChangeUser.png" ID="ChangeUser" />
                    <telerik:RibbonBarButton Text="Log off" Size="Large" ImageUrlLarge="../Images/ArrowLeft.png" ID="LogOff" />
                </Items>
            </telerik:RibbonBarGroup>
        </telerik:RibbonBarTab>
    </telerik:RadRibbonBar>


Regards,

Andrew

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 08 Jun 2011, 09:58 AM
Hello Andrew,

Yes, you can cancel the ButtonClicking event on the client, which in turn will stop the postback. Here is more info about the event.

I hope this helps.

Regards,
Simon
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
RibbonBar
Asked by
Andrew
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or