This question is locked. New answers and comments are not allowed.
Hi
I have defined a ClientTemplate which needs to display an employee and its roles as a list of items inside a single column.
Take following example:
person.cs:
Is there a way to have the roles op the employee displayed as an list inside the same column?
Kind regards,
Ronald Anthonissen
I have defined a ClientTemplate which needs to display an employee and its roles as a list of items inside a single column.
Take following example:
person.cs:
public
class
Person
{
public
Guid Id {
get
;
set
; }
public
string
FirstName {
get
;
set
; }
public
string
LastName {
get
;
set
; }
public
string
[] Roles {
get
;
set
; }
}
The grid looks like this:<%= Html.Telerik().Grid<Person>()
.Name(
"Employees"
)
.DataBinding(dataBinding => dataBinding.Ajax()
.Select(
"Employees"
,
"Persons"
))
.Columns(columns =>
{
columns.Bound(e => e.Id);
})
.DetailView(dv => dv.ClientTemplate(
"Name: <#= LastName #>, <#= FirstName #><br />"
+
"Roles: <ul>"
+
/* Person.Roles comes here:
"<li><#= Roles[i] #></li>"
"</ul>"
))
%>
Is there a way to have the roles op the employee displayed as an list inside the same column?
Kind regards,
Ronald Anthonissen