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

[Solved] Bind column to collection property

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
k
Top achievements
Rank 1
k asked on 16 Feb 2011, 06:34 PM
Hi,
 In the Telerik MVC Grid, I want to bind one column to collection and each item in the collection has some properties and want to bind the column to one property.
For example:
Class Customer
{
    string Name;
    List<Address> AddressList;
}

Class Address
{
      string Street1;
}

Now in my grid Address column, I want to display street1 information. How to do this using Client templates?
I've tried like below:

columns.Bound(c => c.AddressList)

.ClientTemplate(

 

"<#= AddressList.AsQueryable().Select(al => al.Street1).ToString() #>"); It is not working.

 


Thanks in advance

1 Answer, 1 is accepted

Sort by
0
k
Top achievements
Rank 1
answered on 18 Feb 2011, 08:38 PM
bump.
Tags
Grid
Asked by
k
Top achievements
Rank 1
Answers by
k
Top achievements
Rank 1
Share this question
or