Selecting Tile Client Side

2 posts, 1 answers
  1. Ron
    Ron avatar
    86 posts
    Member since:
    Sep 2009

    Posted 03 Sep 2013 Link to this post

    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?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Sep 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top