New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Accessing Controls in RadListView

Description

There are various scenarios where it is required to access the Template controls of RadListView. On server-side you can use the ItemDataBound/ItemCreated event handlers by utilizing the FindControl method to access the generated controls, whereas on client-side you can make avail of the $telerik.findControl or $telerik.findElement methods.

Solution

RadListView and RadDataForm are very similar controls. While the DataForm is a control suitable for visualizing one record at a time, the ListView can display and access multiple items simultaneously.

You can check the following Web Site sample for various ways of accessing template controls in both controls:
Accessing Controls in DataForm

Just instead of RadDataFormDataItem type, you can use the corresponding RadListViewDataItem class.

In this article