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

[Solved] Master/Detrail Grid isn't nested

3 Answers 71 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.
Keivan Beigi
Top achievements
Rank 1
Keivan Beigi asked on 21 Oct 2010, 08:07 AM
I'm trying to add a master detail grid to my page, but the detail grid renders outside of it's master grid.

I have a master grid with 5 rows, coherently the page shows 6 grids, 5 detail grid on top of the page and the master grid right bellow.

<%= Html.Telerik().Grid(Model.Episodes)
        .Name("Episodes")
       .Columns(columns =>
        {
           columns.Bound(c => c.EpisodeNumber).Width(10);
           columns.Bound(c => c.Title);
           columns.Bound(c => c.AirDate).Format("{0:d}").Width(150);
        })
         .DetailView(fView => fView.Template(f => Html.Telerik().Grid(f.Files).Columns(c=> c.Bound(o=>o.Path)).Name("Files_" + f.EpisodeId).Render()))
        .Groupable(grouping => grouping.Groups(groups => groups.Add(c => c.SeasonNumber)))
        .Sortable(rows=>rows
            .OrderBy(epSort => epSort.Add(c => c.EpisodeNumber)))
             
    %>

i would appreciate any help.

thanks,

3 Answers, 1 is accepted

Sort by
0
Jigar
Top achievements
Rank 1
answered on 21 Oct 2010, 11:09 AM
Hi Keivan,

Please have a look at this on demo page.

this may help.

Regards,

Jigar.
0
Keivan Beigi
Top achievements
Rank 1
answered on 21 Oct 2010, 06:17 PM
I have looked at the demos, my code sample is actually a modified copy paste from the demo.
0
Steve
Top achievements
Rank 1
answered on 21 Oct 2010, 11:50 PM
Hi,

  Did you try to add those lines to your master grid?

ClientEvents(events => events.OnLoad("function(e) { $(this).find('table').css('table-layout', 'fixed'); }"))

I already had a similar problem and it was the correction.  Follow this link for all details.
http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-row-bad-positionning.aspx

Steve
Tags
Grid
Asked by
Keivan Beigi
Top achievements
Rank 1
Answers by
Jigar
Top achievements
Rank 1
Keivan Beigi
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Share this question
or