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

Use RadWindow radconfirm with RadIconTile

4 Answers 45 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 2
Anna asked on 12 Feb 2015, 07:40 AM
I need to use a radwindow confirmation with an icontile just like you would with a button.   How would I accomplish this with javascript?

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 12 Feb 2015, 12:24 PM

Hi Anna,

I first advise that you examine the following demo and its description to get an understanding of the cases where the browser confirm() dialog can be replaced with RadConfirm: http://demos.telerik.com/aspnet-ajax/window/examples/confirmserverclicks/defaultcs.aspx.

The caveat with tiles is that they do not expose a click() method for programmatic invocation of the user action. If you believe this should be added to the control's feature set, I can suggest posting your request and explanations in our feedback portal: http://feedback.telerik.com/project/108. If it gains enough traction and approval from our management, it will be implemented.

In the meantime, I can suggest the following code:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
<telerik:RadIconTile runat="server" ID="RadIconTile1" OnClientClicking="OnClientClicking"></telerik:RadIconTile>
<script>
    function OnClientClicking(sender, args) {
        args.set_cancel(true);
        function theCallBackFn(arg) {
            if (arg)
                sender._onClick(new Telerik.Web.UI.TileCancelEventArgs(sender.get_navigateUrl()));
        }
        radconfirm("do you confirm this click?", theCallBackFn);
    }
</script>

Note that this uses an "internal" method that may change in a future version, so this should be carefully tested when upgrading.

Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Anna
Top achievements
Rank 2
answered on 12 Feb 2015, 02:57 PM
Perfect!  Thank you so much! 
0
Anna
Top achievements
Rank 2
answered on 09 Mar 2015, 06:21 PM
The solution worked until I updated to Q1 2015.  Any known issues?  This is driving me crazy.

0
Marin Bratanov
Telerik team
answered on 10 Mar 2015, 01:52 PM

Hello Anna,

There have been no changes to the tiles and this seems to work fine for me. I am attaching here a short video from my test as a reference. While my previous sample did not include them, you must set a few properties to actually get an action from the tile, with or without a confirmation.

Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TileList
Asked by
Anna
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Anna
Top achievements
Rank 2
Share this question
or