Open RadWindow from RadTileList

7 posts, 0 answers
  1. Guy
    Guy avatar
    10 posts
    Member since:
    Mar 2009

    Posted 03 Dec 2013 Link to this post

    I tried to open RadWindow from RadTileList in OnClientTileClicked event.

    RadWindow is opening, however, then it is closed and result shows in same window as RadTileList

     

    function OnClientTileClicked(tileList, args) {
                var tile = args.get_tile();
                var url = args.get_oldValue();
     
                //confirm navigation if url has been specified
                if (url !== "") {
                    var oManager = GetRadWindowManager();
                    var oWnd = oManager.getWindowByName("RadWindow1");
                    if (oWnd === null) {
                        oWnd = oManager.open(url, "RadWindow1");
                    }
                    else
                    {
                        oWnd.setUrl(url);
                    }
                    args.set_cancel(true);
                }
                //request navigation url to be set
                else {
                    tile.set_navigateUrl(prompt("No url specified. Please enter a navigation url:"));
                }
            }
     
            function RadWindowOnClientClose(sender, args) {
                if (args.get_argument() !== null) {
                }
            }

     

     

       <telerik:RadTileList ID="RadTileList1" runat="server" Skin="Office2007" Width="930px" Height="500px" OnClientTileClicked="OnClientTileClicked" AutoPostBack="false" SelectionMode="Single" ScrollingMode="Auto">
            <Groups>
                <telerik:TileGroup>
                    <telerik:RadTextTile runat="server" NavigateUrl="/Kodes/Algemeen/Komplexen.aspx" Target="_self"
                        Title-ImageUrl="/images/filetypes/access.gif"
                        Title-Text="Wat is gewijzigd" Text="Hier komen de wijzigingen. Dit is een test van een heel lange omschrijving." Shape="Wide">
                        <Badge Value="22" />
                    </telerik:RadTextTile>
                    <telerik:RadImageAndTextTile runat="server"
                        ImageUrl="~/Images/FileTypes/Powerpoint24.png"
                        Title-ImageUrl="/images/filetypes/access.gif"
                        Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen" Shape="Wide">
                    </telerik:RadImageAndTextTile>
                    <telerik:RadTextTile ID="RadTextTile1" runat="server"
                        Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen">
                    </telerik:RadTextTile>
    </telerik:TileGroup>
            </Groups>
             
        </telerik:RadTileList>


    Any idea ?

    Best regards,
    Guy Van Dyck
    Guynius Software

     

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2013 Link to this post

    Hi,

    I assume that you want to redirect to the RadTileList Page after closing the RadWindow. Please have a look into the following JavaScript to redirect to the RadTileList page.

    JavaScript:
    <script type="text/javascript">
        function Close(sender, args) {
            //redirect to the tilelist page
            document.location.href = 'RadTileList.aspx';
        }
    </script>

    Please elaborate your scenario if it doesn't help you.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Guy
    Guy avatar
    10 posts
    Member since:
    Mar 2009

    Posted 04 Dec 2013 Link to this post

    No.  I want to open a new RadWindow the moment I click on the Tile.  If I close the RadWindow, I'm back on the page with tiles.

    When I click, I see the window opening, but then immediately the main page is redirected to that page which should be opened in RadWindow.

    Best regards
    Guy
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 04 Dec 2013 Link to this post

    Hi guys,

    If understand the OP's question, the desired result is to open the NavigateUrl of the tile in a RadWindow and not navigate upon a click. You can do this by using the OnClientClicking event of the control and cancelling it, as shown here: http://www.telerik.com/help/aspnet-ajax/tilelist-client-side-events-onclienttileclicking.html.
    function OnClientTileClicking(sender, args) {
        //open RadWindow
        radopen(args.get_value(), "RadWindow1");
        //prevent navigation from the TileList
        args.set_cancel(true);
        //you can further customize the logic to check for a value first
    }
    <telerik:RadTileList ID="RadTileList1" runat="server" Skin="Office2007"
                         Width="930px" Height="500px" OnClientTileClicking="OnClientTileClicking"
                         AutoPostBack="false" SelectionMode="Single" ScrollingMode="Auto">
        <Groups>
            <telerik:TileGroup>
                <telerik:RadTextTile runat="server" NavigateUrl="/Kodes/Algemeen/Komplexen.aspx"
                                     Target="_self"
                                     Title-ImageUrl="/images/filetypes/access.gif"
                                     Title-Text="Wat is gewijzigd" Text="Hier komen de wijzigingen. Dit is een test van een heel lange omschrijving."
                                     Shape="Wide">
                    <Badge Value="22" />
                </telerik:RadTextTile>
                <telerik:RadImageAndTextTile runat="server"
                                             ImageUrl="~/Images/FileTypes/Powerpoint24.png"
                                             Title-ImageUrl="/images/filetypes/access.gif"
                                             Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen"
                                             Shape="Wide">
                </telerik:RadImageAndTextTile>
                <telerik:RadTextTile ID="RadTextTile1" runat="server"
                                     Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen">
                </telerik:RadTextTile>
            </telerik:TileGroup>
        </Groups>
     
    </telerik:RadTileList>



    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Guy
    Guy avatar
    10 posts
    Member since:
    Mar 2009

    Posted 04 Dec 2013 Link to this post

    Exactly what i'm doing.  I see the RadWindow appearing but then the main page is redirected to navigateURL page before the Radwindow content is loaded.

    so it seems as the      args.set_cancel(true);   is not working

    I've added a breakpoint on Page_Load event to see if there is a postback, but that isn't the case either.

    Best regards
    Guy Van Dyck
  7. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 04 Dec 2013 Link to this post

    Hello Guy,

    Can you confirm you are using the OnClientTileClickING event? It can be used to prevent navigation. I am attaching here a short video with the expected behavior with the code I just shared.
    Also, make sure you have no JavaScript errors, this can cause problems with any script.


    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  8. Guy
    Guy avatar
    10 posts
    Member since:
    Mar 2009

    Posted 04 Dec 2013 Link to this post


    OH NO !!! STUPID ME !!!

    I was using OnClientTileClicked event instead of OnClientTileClicking

    Sorry !  Thanks for your support !

    Best regards
    Guy Van Dyck
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017