Edit this page

OnTileClick

The TileClick server side event is triggered when a tile is clicked with the left mouse button (or is tapped on a touch device) and the AutoPostBack property is set to true. Navigation will not occur even if a NavigateUrl is provided in the given tile, but a postback will be invoked instead.

The event handler receives two arguments - of type object that is a reference to the RadTileList control that fired the event and can be cast to it, and a Telerik.Web.UI.TileListEventArgs object that can be used to get a reference to the clicked Tile through its Tile property. It returns an object of type RadBaseTile.

<telerik:RadTileList RenderMode="Lightweight" runat="server" ID="RadTileList1" AutoPostBack="true" OnTileClick="OnTileClick">
    <Groups>
        <telerik:TileGroup>
            <telerik:RadTextTile Name="First" NavigateUrl="http://www.telerik.com/" Title-Text="Telerik" Shape="Wide">
            </telerik:RadTextTile>
            <telerik:RadTextTile Name="Second" NavigateUrl="http://www.google.com/" Title-Text="Google" Shape="Wide">
            </telerik:RadTextTile>
            <telerik:RadTextTile Name="Third" NavigateUrl="http://www.bing.com" Text="Bing">
            </telerik:RadTextTile>
            <telerik:RadTextTile Name="Fourth" NavigateUrl="http://www.wikipedia.org/" Text="Wikipedia">
            </telerik:RadTextTile>
        </telerik:TileGroup>
    </Groups>
</telerik:RadTileList>
<div runat="server" id="clickResult">
</div>
protected void OnTileClick(object sender, TileListEventArgs e)
{
    clickResult.InnerHtml = "Clicked tile name and URL: " + e.Tile.Name + "<br />" + e.Tile.NavigateUrl;
    //note: e.Tile is of type RadBaseTile
}
Protected Sub RadTileList1_TileClick(sender As Object, e As Telerik.Web.UI.TileListEventArgs) Handles RadTileList1.TileClick
    clickResult.InnerHtml = "Clicked tile name and URL: " & e.Tile.Name & "<br />" & e.Tile.NavigateUrl
    'note: e.Tile is of type RadBaseTile
End Sub
Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy