Cannot add the break line from RadTextTile

2 posts, 0 answers
  1. Sarah Shum
    Sarah Shum avatar
    3 posts
    Member since:
    Nov 2007

    Posted 02 Mar 2015 Link to this post

    When I tried to insert a break line between each tile.text, it seem not working. I looked at your example for TileList - Declarative DataSource.  Pleas help.

    tile.Text = DataBinder.GetPropertyValue(e.Tile.DataItem, "RoomNumber", null) + "<BR> " +
    DataBinder.GetPropertyValue(e.Tile.DataItem, "DepartmentAbbreviation", null) + "<BR> " +
    DataBinder.GetPropertyValue(e.Tile.DataItem, "RoomStatus", null) + "<BR> " + "Check In: " + DataBinder.GetPropertyValue(e.Tile.DataItem, "StartDateTime", "{0:hh:mm:ss tt}");

    The <BR> cannot break each data from the tile.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 04 Mar 2015 Link to this post

    Hi Sarah,

    The tile text is a text property, not an HTML property. Thus, it does not allow new lines (or any HTML for that matter). They are converted to text (i.e., special characters like '<' are converted to entities).

    What I can suggest are the following ideas:

    • Consider using a ContentTemplateTile where you can put the desired HTML in a control (Literal or Label, for example). This will let you generate the desired layout in the tile.
    • Consider using a placeholder character that you can replace with the <br> tag with JavaScript. This is, however, likely to break the tile's appearance.


    Regards,

    Marin Bratanov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top