This question is locked. New answers and comments are not allowed.
I want to implement the master detail view functionality in telerik's mvc webgrid. The problem is that while the first row comes expanded by default, i cannot collapse the first row and i cannot expand the successive rows to view the data. What do i do to achieve the functionality? The code is:
@{ Html.Telerik().Grid(this.Model) .Name("grdPersonView") .Columns(columns => { columns.Bound(p => p.id); columns.Bound(p => p.age); columns.Bound(p => p.name); }) .DetailView(detailview => detailview.Template(e => { Html.Telerik().Grid(e.GetPersons()) .Name("Subgrid") .Columns(column => { column.Bound(p => p.name); column.Bound(p => p.age); }) .Pageable(pager => pager.PageSize(2)) .Render(); })) .RowAction(row => { if (row.Index == 0) { row.DetailRow.Expanded = true; } }) .Pageable(pager => pager.PageSize(20)) .Sortable(sorting => { sorting.SortMode(GridSortMode.MultipleColumn); sorting.OrderBy(sortOrder => sortOrder.Add(p => p.id)); } ) .Render(); }