How to bind data to parent & its child grid at a time in asp.net MVC4(Telerik version : 2011.2.712.340)? when child grid has placed inside detailview.

1 posts, 0 answers
  1. Ajay
    Ajay avatar
    4 posts
    Member since:
    Nov 2010

    Posted 28 Apr 2014 Link to this post

    How to bind data to parent & its child grid at a time in asp.net MVC4(Telerik version : 2011.2.712.340)? when child grid has placed inside detailview. We want to bind data to child grid as well on parent grid's DataBinding event rather click on expand button in the parent grid.
    For e.g.
     Html.Telerik().Grid<IVWDocument>()
                .Name("ViewDownloadGrid")
                .Columns(columns =>{//Some Columns})
                .DetailView(details => details.ClientTemplate(
                                            Html.Telerik().Grid<IVWDocument>()
                                            .Name("ChildGrid_<#= SerialId #>")
                                            .Columns(columns =>
                                            {   
                                                columns.Bound(o => o.Notes).Title("Notes").Width("20%");                                            
                                            })
                                            .DataBinding(dataBinding => dataBinding.Ajax()
                                            .Select("_GetForDetailsView", "ViewDownLoad", Model),  new { SerialId = "<#=SerialId #>"}))
                                            .ToHtmlString()
            )).DataBinding(dataBinding => dataBinding.Ajax().Select("_GetFilesForViewDownload", "ViewDownLoad", Model))
Back to Top