The SelectionStateChanged server-side event is fired when a Tile is selected and AutoPostBack is set to true. It allows the developer to obtain the selected tile in order to use that information.

The event handler receives two arguments - of type object that is a reference to the RadBaseTile control that fired the event and can be cast to it, and a System.EventArgs object.

The API of the RadBaseTile object itself is used to obtain the tile selection, so this can be done in any other event. The OnSelectionStateChanged event only provides an immediate event that can be used by the developer.

<telerik:RadTextTile ID="Tile1" runat="server" AutoPostBack="true" 
    Text="Tile for selection" 
<asp:Label Text="" runat="server" ID="Label1"/>

Here is an example how to get the selection state of tile:

protected void Tile1_SelectionStateChanged(object sender, EventArgs e)
    Label1.Text = "The Tile is " + (Tile1.Selected ? "selected." : "not selected.");
Protected Sub Tile1_SelectionStateChanged(sender As Object, e As EventArgs)
    Label1.Text = "The Tile is " + If(Tile1.Selected, "selected.", "not selected.")
End Sub
In this article
Not finding the help you need? Improve this article