Databinding RadTileList

4 posts, 0 answers
  1. Walther Siksma
    Walther Siksma avatar
    12 posts
    Member since:
    May 2006

    Posted 20 Jun 2013 Link to this post

    I would like to load an entire list of tiles from a database. 
    Is there any way to add Tiles programmatically via codebehind ( Radtilelist1.Tiles.Add ( new (radtile ....... '
    or build tiles dynamically via databinding?


    I did find  Databind and EnableDynamicData  methods but I could not find any documentation on how to implement that.
    Any hint appreciated :)
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 20 Jun 2013 Link to this post

    Hi Walther,

    I am afraid databinding is not available in the beta release of the control. We are planning to have that feature for the Q3 2013 release when we are also aiming to move the control out of the beta phase.

    For the time being you can create tiles programmatically like any other sever controls and here is a basic example:
    protected void Page_Init(object sender, System.EventArgs e)
    {
        RadTileList tl = new RadTileList();
        TileGroup tg = new TileGroup();
        tl.Groups.Add(tg);
     
        for (index = 1; index <= 5; index++)
        {
            RadTextTile tile = new RadTextTile();
            //you can also use the other tile types, I am using one for brevity
            tile.Text = "tile number " + index;
            tile.Badge.Value = index;
            tg.Tiles.Add(tile);
        }
     
        Placeholder1.Controls.Add(tl);
    }

    <form id="form1" runat="server">
    <asp:ScriptManager ID="Scriptmanager1" runat="server" />
    <asp:Button ID="Button1" Text="postback" runat="server" />
    <asp:PlaceHolder ID="Placeholder1" runat="server" />
    </form>

    You can examine the RadTile's server-side API for mode details on the available properties.


    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mayur
    Mayur avatar
    5 posts
    Member since:
    Sep 2010

    Posted 09 Aug 2013 Link to this post

    How would I do this same thing in "ASP.Net MVC" aspx engine (and/or razor engine)?
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 13 Aug 2013 Link to this post

    Hi Mayur,

    I have already responded to your ticket on the same subject and here is my answer for other people that may have a similar question:


    I am afraid a TileList for MVC is not in our immediate plans and the RadControls for ASP.NET AJAX cannot be used with this engine (Razor).
    The RadTileList is not tested for MVC and I cannot guarantee its full compatibility. Moreover, with the databinding we are working on for Q3 2013 it will be coupled more tightly with the WebForm lifecycle and architecture (e.g. viewstate, events).
    You can try using a webform to add the control or an iframe that will point to a regular aspx webform page.


    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.
Back to Top