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

Open RadWindow from RadTileList

6 Answers 57 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 03 Dec 2013, 10:46 AM

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

 

 

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 04 Dec 2013, 05:37 AM
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.
0
Guy
Top achievements
Rank 1
answered on 04 Dec 2013, 09:18 AM
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
0
Marin Bratanov
Telerik team
answered on 04 Dec 2013, 01:53 PM
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.
0
Guy
Top achievements
Rank 1
answered on 04 Dec 2013, 02:05 PM
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
0
Marin Bratanov
Telerik team
answered on 04 Dec 2013, 02:52 PM
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.
0
Guy
Top achievements
Rank 1
answered on 04 Dec 2013, 03:18 PM

OH NO !!! STUPID ME !!!

I was using OnClientTileClicked event instead of OnClientTileClicking

Sorry !  Thanks for your support !

Best regards
Guy Van Dyck
Tags
TileList
Asked by
Guy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Guy
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or