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

Selecting Tile Client Side

1 Answer 20 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 2
Ron asked on 04 Sep 2013, 04:26 AM
I greatly enjoy this new control, however, the one thing I wish it did have was the ability to allow selection of tiles via the left mouse button click.  So in order to do this, I was looking to see if there is a way to select a tile OnClientTileClicked event to simulate this.  Do you have any examples?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 04 Sep 2013, 05:55 AM
Hi Ron,

Please try the following code snippet that i have tried to select a RadTile on OnClientTileClicked event.

ASPX:
<telerik:RadTileList runat="server" ID="RadTileList1" Width="634px" TileRows="3"
    SelectionMode="Multiple" AutoPostBack="false" OnClientTileClicked="OnClientTileClicked1">
    <Groups>
        <telerik:TileGroup>
            <telerik:RadImageTile Name="Image1" ImageUrl="../Images/Icon-small.jpg">
            </telerik:RadImageTile>
            <telerik:RadImageTile Name="Image2" ImageUrl="../Images/index.jpg">
            </telerik:RadImageTile>
        </telerik:TileGroup>
    </Groups>
</telerik:RadTileList>

JavaScript:
<script type="text/javascript">
    function OnClientTileClicked1(sender, args) {
        if (args.get_tile().get_selected())
            args.get_tile().set_selected(false);
        else
            args.get_tile().set_selected(true);
    }
</script>

Thanks,
Shinu.
Tags
TileList
Asked by
Ron
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Share this question
or