RadRibbonBar client and server side events

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    2 posts
    Member since:
    Oct 2010

    Posted 02 Jun 2011 Link to this post

    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
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 08 Jun 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top