Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Second Tier MVC DataGrid not sending AJAX requests

Not answered Second Tier MVC DataGrid not sending AJAX requests

Feed from this thread
  • Sam avatar

    Posted on Feb 17, 2012 (permalink)

    Hi,

    I'm trying to use an MVC datagrid embedded in a parent datagrid. It is shown when drilling down into a row. I followed the template on the website, but I cannot get it to work. The child datagrid is not sending any AJAX requests. I tried also using a dummy method in the controller that doesn't take any parameters to see if that was the issue, and that was not called either.

    Thanks for any help.
    @{
                Html.Telerik()
                    .Grid<NotesItem>()
                    .Name("NotesGrid")
                    .DetailView(details => details.ClientTemplate(Html.Telerik()
                        .Grid<VersionInformation>()
                        .Name("Documents_<#= Path #>")
                        .DataBinding(dataBinding => dataBinding.Ajax().Select("GetDocumentVersionHistoryAjax", "Home")), new { path = "<#= Path #>" }))
                        .Columns(columns =>
                        {
                            columns.Bound(o => o.Url);
                            columns.Bound(o => o.CreatedBy).Title("Changes By");
                            columns.Bound(o => o.CreatedDate).Format("{0:MM/dd/yyyy}");
                            columns.Bound(o => o.VersionId);
                        })
                        .Pageable()
                        .Sortable()
                        .ToHtmlString()
                    ))
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("GetDocumentDataAjax", "Home"))               
                    .Columns(columns =>
                    {                   
                        columns.Bound(o => o.CheckedOutTo).Width(200).Title("Checked Out");
                        columns.Bound(o => o.Name).Title("Document");
                        columns.Bound(o => o.CreatedBy).Format("{0:MM/dd/yyyy}").Width(120);
                        columns.Bound(o => o.Version).Width(100).Title("Last Check In Comment");
                    })               
                    .Groupable()
                    .Sortable()
                    .Pageable()
                    .Filterable()
                    .Render()
                    ;
                }

    Reply

  • Petur Subev Petur Subev admin's avatar

    Posted on Feb 22, 2012 (permalink)

    Hi Sam,

    I do not see any problems in the code you shared. Could you please attach the sample project you which you are using, so I can investigate what goes wrong?

    Kind Regards,
    Petur Subev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Sam avatar

    Posted on Feb 28, 2012 (permalink)

    For whatever reason the .Name("Documents_<#= Path #>") was not working correctly. When I changed this to an Id field, the the code worked.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Second Tier MVC DataGrid not sending AJAX requests