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

Radconfirm multiple buttons?

8 Answers 282 Views
Window
This is a migrated thread and some comments may be shown as answers.
Alan T
Top achievements
Rank 1
Alan T asked on 13 Oct 2011, 03:17 PM
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

8 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Oct 2011, 10:44 AM
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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 14 Oct 2011, 12:06 PM
Neat trick.

I'll try and remember that one!

-- 
Stuart


0
Alan T
Top achievements
Rank 1
answered on 16 Oct 2011, 06:06 PM
Interesting tip to know. I actually meant having 3 buttons on the radconfirm as opposed to just the ok and cancel. 
0
Princy
Top achievements
Rank 2
answered on 17 Oct 2011, 08:54 AM
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.
0
Somnath
Top achievements
Rank 1
answered on 17 Oct 2011, 11:14 AM
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 ,



0
Princy
Top achievements
Rank 2
answered on 17 Oct 2011, 02:41 PM
Hello Ankit,

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

Thanks,
Princy.
0
Alan T
Top achievements
Rank 1
answered on 17 Oct 2011, 05:41 PM
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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 17 Oct 2011, 10:51 PM
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
Tags
Window
Asked by
Alan T
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Stuart Hemming
Top achievements
Rank 2
Alan T
Top achievements
Rank 1
Somnath
Top achievements
Rank 1
Share this question
or