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

[Solved] Razor Colums.Bound nested list

0 Answers 21 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.
Örvar
Top achievements
Rank 1
Örvar asked on 19 Apr 2011, 12:04 PM
Hi there

I get a list from my controlles that is a list of employeecalenderobjects. These objects have a nested list that holds calendarobjects.
List<EmployeeCalendar> calendarEntries = EmployeeFactory.GetAttendancePlan();
In my Index.cshtml page i have the following code:

@model IEnumerable<MVCRazorPoC.Models.EmployeeCalendar>
 
<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td>
            @(Html.Telerik().Grid(Model)
                .Name("Grid")
                .Columns(columns =>
                {
                    columns.Bound(o => o.EmpNo).Title("No");
                    columns.Bound(o => o.Firstname).Title("Name");
                })              
                .DataBinding(dataBinding =>
                {
                    dataBinding.Server().Select("Index", "Grid");
                })
                )
        </td>
    </tr>
</table>
So i was wondering is it possible to get the nested objects in my employeelist and access those objects and get them to bound to the grid?
Tags
Grid
Asked by
Örvar
Top achievements
Rank 1
Share this question
or