This is a migrated thread and some comments may be shown as answers.
Requested URL dd not return JSON
1 Answer 34 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MarkNic
Top achievements
Rank 1
MarkNic asked on 29 Jul 2010, 09:31 PM
I had this grid working exactly as I wanted (Yesterday).  Something obviously has changed but I cannot determine what it is.  I have a grid that is to display a list of html files and have hyperlinks embedded so you can click on the files and they will fire off another browser to show you the content.  Using Client/Ajax binding.

Here's my grid:
<%= Html.Telerik().Grid<FileEntry>()       
            .Name("Grid")        
            .Columns(columns =>
       {
        columns.Bound(o => o.AreaName).Width(280);
        columns.Bound(o => o.FileName).ClientTemplate("<a href='" + "<#= FileUri #>' target='_blank'><#= FileName #></a>");
        columns.Bound(o => o.ReportWeek).Format("{0:yyyy-MM-dd}").Width(120);
       })
            .DataBinding(dataBinding => dataBinding.Ajax().Select("ShowNraReports", "Status"))
            .Scrollable(s => s.Enabled(true))
            .Sortable(sort => sort.Enabled(true))
            .Pageable(p => p.Enabled(true))
            .Filterable(filtering => filtering.Enabled(true))     
            .Groupable(grouping => grouping.Enabled(true))      
            .Footer(true)
    %>

My Controller code:
[GridAction]
public ActionResult ShowNraReports()
{
   return View(FileEntryList());
}

FileEntryList goes out and grabs the file properties and fills a List<FileEntry> collection.  It is working just fine.

FileEntry:
public class FileEntry
{
    public String FileUri { get; set; }
    public string BlobName { get; set; }
    public string FileName { get; set; }
    public string Submitter { get; set; }
    public string ReportWeek { get; set; }
    public int LocationId { get; set; }
    public string AreaName { get; set; }
}


What did work yesterday is now popping up an alert window that says "Requested URL dd not return JSON".  Is there something here that I am just not seeing?

Thanks, Mark

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 30 Jul 2010, 08:01 AM
Hi MarkNic,

Try to return new GridModel to the View:
[GridAction]
public ActionResult ShowNraReports()
{
   return View(new GridModel(FileEntryList()));
}
Check this demo for more information.

Best wishes,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
MarkNic
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or