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

Cannot add the break line from RadTextTile

1 Answer 52 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Sarah Shum
Top achievements
Rank 1
Sarah Shum asked on 02 Mar 2015, 11:46 PM
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.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Mar 2015, 11:56 AM

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.

 
Tags
TileList
Asked by
Sarah Shum
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or