This question is locked. New answers and comments are not allowed.
Hi
I made this code, and i can't find where is the error.
The view:
The controller:
If i use these code in Firefox or Chrome, it's works, but if i click the link, or refresh page i get alert, with this text:
"Error! The requested URL did not return JSON,".
If i want use these code in IE or Opera the links are dead.
I use 2010.2.713 release, but i tried this with 2010.1.416 and 2010.1.518 too, but still not good.
If you have any idea please share with me.
P.S.: I tried server binding , but i can't set sorting and filtering if i use Template, so i have to do it with AjaxBinding
Thx
I made this code, and i can't find where is the error.
The view:
<% .Grid<GridDemoMvc.Models.viewWebReport_CompliantUsage>() .Name("Grid") .DataBinding(dataBinding => dataBinding .Ajax() .Select("CompliantUsage_Select", "CompliantUsage") ) .Columns(c => {
c.Bound(o => o.Vendor).ClientTemplate("<a href='" + Url.Content("/IPC/IPC/") + "<#= Vendor #>/" + "'><#=Vendor#></a>").Title("a"); c.Bound(o => o.Vendor).ClientTemplate("<a href=\"/IPC/IPC/" + "<#=Vendor#>" + "\">" + "<#=Vendor#>" + "</a>").Encoded(false).Title("b").HtmlAttributes(new { @class = "ihover ReceivedMemos" }); c.Bound(o => o.Product).ClientTemplate("<a href=\"/IPC/IPC/" + "<#=Product#>" + "\">" + "<#=Product#>" + "</a>").Encoded(false).Title("c").HtmlAttributes(new { @class = "ihover ReceivedMemos" }); } ) .Pageable(paging => paging.PageSize(20) .Style(GridPagerStyles.NextPreviousAndNumeric) .Position(GridPagerPosition.Bottom) ) .Sortable() .Filterable() .Groupable()
.ClientEvents(events => events.OnDataBound("onDataBound"))
.EnableCustomBinding(true) .Render(); %> public ActionResult CompliantUsage() { return View(GetCompliantUsage()); } private IEnumerable<viewWebReport_CompliantUsage> GetCompliantUsage() { DataClasses1DataContext northwind = new DataClasses1DataContext(); return northwind.vW_CompliantUsages; }[GridAction] public ActionResult CompliantUsage_Select() { return View(new GridModel { Data = GetCompliantUsage() }); }If i use these code in Firefox or Chrome, it's works, but if i click the link, or refresh page i get alert, with this text:
"Error! The requested URL did not return JSON,".
If i want use these code in IE or Opera the links are dead.
I use 2010.2.713 release, but i tried this with 2010.1.416 and 2010.1.518 too, but still not good.
If you have any idea please share with me.
P.S.: I tried server binding , but i can't set sorting and filtering if i use Template, so i have to do it with AjaxBinding
Thx