Radconfirm multiple buttons?

9 posts, 0 answers
  1. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 13 Oct 2011 Link to this post

    I'm not sure if i can accomplish this is a radconfirm or radalert. But this my scenario;

    You can make an enquiry on an item. But to do so you must be logged in. So what i'm doing at the moment is using javascripts alert to popup a message saying, "You need to be registered click 'ok' here to register, or 'cancel' to cancel...".

    However i'd like to have 'Click here to register, or click here to login, or click here to cancel'. Is this possible with either of these or will i have to use an actual radwindow ?

    Alan
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Oct 2011 Link to this post

    Hello Alan,

    I suppose you need to change the text of OK and Cancel button.Try the following Javascipt
    JS:
    <script type="text/javascript">
    Telerik.Web.UI.RadWindowUtils.Localization =
    {
        "OK": "Click here to register",
        "Cancel": "Click here to cancel"
    };
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 14 Oct 2011 Link to this post

    Neat trick.

    I'll try and remember that one!

    -- 
    Stuart


  5. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 16 Oct 2011 Link to this post

    Interesting tip to know. I actually meant having 3 buttons on the radconfirm as opposed to just the ok and cancel. 
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Oct 2011 Link to this post

    Hello Alan,

    You can achieve this by using the ConfirmTemplate as shown below.
    aspx:
    <telerik:RadWindowManager ID="window" runat="server">
    <ConfirmTemplate>
        <asp:Button ID="Button3" runat="server" Text="Ok" />
        <asp:Button ID="Button4" runat="server" Text="Cancel" />
        <asp:Button ID="Button5" runat="server" Text="Submit" />
    </ConfirmTemplate>
    </telerik:RadWindowManager>

    Thanks,
    Princy.
  7. Somnath
    Somnath avatar
    43 posts
    Member since:
    Jun 2012

    Posted 17 Oct 2011 Link to this post

    Hi ,

    I want RadConfirm with three buttons Yes, No, Cancel .with each button click need to call 3 different functions ,

    I want this behaviour on one page only .

    Please suggest some solution ,



  8. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Oct 2011 Link to this post

    Hello Ankit,

    You can take a look into the following code library.
    Customizing the radconfirm dialog

    Thanks,
    Princy.
  9. Alan T
    Alan T avatar
    125 posts
    Member since:
    Apr 2010

    Posted 17 Oct 2011 Link to this post

    Thats pretty much it. I've had a read of that code library stuff, and it gets quite complicated.

    I simply want a 'register' button which redirects to register page, a login button, which redirects to login page, and a cancel button that closes the confirm.

    I'm not sure how i can handle those clicks, nor how i should be calling the radconfirm

      lb.Attributes.Add("onclick", "javascript:radconfirm('Registered user required', callback, 200, 200, 'Registered user required')")

    Is just redirecting me to my register page at the moment.
  10. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 17 Oct 2011 Link to this post

    Alan,

    This is very much just my opinion, but it seems to me that anything other than simple mods of the built in windows are easier to achieve writing things from scratch using RadWindow.

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