Use RadWindow radconfirm with RadIconTile

5 posts, 0 answers
  1. Anna
    Anna avatar
    10 posts
    Member since:
    Dec 2010

    Posted 12 Feb 2015 Link to this post

    I need to use a radwindow confirmation with an icontile just like you would with a button.   How would I accomplish this with javascript?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 12 Feb 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Anna
    Anna avatar
    10 posts
    Member since:
    Dec 2010

    Posted 12 Feb 2015 in reply to Marin Bratanov Link to this post

    Perfect!  Thank you so much! 
  5. Anna
    Anna avatar
    10 posts
    Member since:
    Dec 2010

    Posted 09 Mar 2015 Link to this post

    The solution worked until I updated to Q1 2015.  Any known issues?  This is driving me crazy.

  6. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 10 Mar 2015 Link to this post

    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.

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