Customizing Items
You can use the ItemDataBound event to change item content based on the data that is bound to each item. The ListItemDataBoundEventArgs include properties for the native DataBoundItem (a DataRowView object, which provides access to the entire row being bound) and the data item of RadListControl. In the example below the DisplayName property is set to "FirstName". Two other columns, "FirstName" and "TitleOfCourtesy", are pre-pended to the data list item.
With the introduction of the HTML-like text rendering feature, Telerik Presentation Framework increased the level of the available customizations that you can apply. That said, you are able to use this feature to indicate different roles of different parts of the Text property value.
The aim of this article is to demonstrate how you can achieve to look shown below. As you can see we have three different parts of the text: TitleOfCourtesy, FullName(FirstName + LastName) and Title. For the purposes of the example, we are going to add an image as well.
Figure 1: Customizing Items
1. Handle the ItemDataBound event to fill the data list items with custom data.
Handling the ItemDataBound event
Image helper method
2. Since the < br > tag will split the Text value in different lines, it is essential to set the AutoSizeItems of RadListControl to true:
Setting AutoSizeItems
3. Should you want to have apply some padding to the visual items, you should do it on CreatingVisualListItem event: