This question is locked. New answers and comments are not allowed.
Hi,
I am trying to get Ajax binding to work with my Grid, but it won't work. When I put the callback URL straight into the browser it says that it can't find the view for my callback:
The view 'ViewSite_FillDomainsList' or its master was not
found. The following locations were searched:
The code works in my environment using the Q1 Examples project, so I don't know what's wrong.
My Client side code is in C# and looks like this:
And my server side in VB looks like this:
The program generates a GridModel in "g" and also get's past the return View(g) line. It also appears to trace right through the GridAction Attribute, but then crashes looking for the View to render.
Surely this can't be a VB vs. C# issue can it? Hopefully it's a common issue and someone will know what I've done.
Best Regards,
Mark
I am trying to get Ajax binding to work with my Grid, but it won't work. When I put the callback URL straight into the browser it says that it can't find the view for my callback:
The view 'ViewSite_FillDomainsList' or its master was not
found. The following locations were searched:
~/Views/Admin/ViewSite_FillDomainsList.aspx
~/Views/Admin/ViewSite_FillDomainsList.ascx
~/Views/Shared/ViewSite_FillDomainsList.aspx
~/Views/Shared/ViewSite_FillDomainsList.ascx
The code works in my environment using the Q1 Examples project, so I don't know what's wrong.
My Client side code is in C# and looks like this:
<%= Html.Telerik().Grid<ApexCMS.SiteAddress>() |
.DataBinding(dataBinding => dataBinding.Ajax().Select("ViewSite_FillDomainsList", "Admin", new { guid = Model.Guid.ToString() })) |
.Name("DomainListGrid") |
.Columns(columns => |
{ |
columns.Bound(o => o.Scheme); |
columns.Bound(o => o.Domain); |
columns.Bound(o => o.Port); |
}) |
.Sortable() |
%> |
And my server side in VB looks like this:
<GridAction()> _ |
Function ViewSite_FillDomainsList(ByVal guid As String) As ActionResult |
Dim s As ISession = NHibernateHelper.OpenSession() |
Dim site As Site = s.CreateCriteria(Of Site).Add(Expression.Eq("Guid", New Guid(guid))).UniqueResult(Of Site)() |
Dim siteaddresses As IList(Of SiteAddress) = s.CreateCriteria(Of SiteAddress).Add(Expression.Eq("Parent", site)).List(Of SiteAddress)() |
Dim g As GridModel(Of SiteAddress) = New GridModel(Of SiteAddress)(siteaddresses) |
Return View(g) |
End Function |
The program generates a GridModel in "g" and also get's past the return View(g) line. It also appears to trace right through the GridAction Attribute, but then crashes looking for the View to render.
Surely this can't be a VB vs. C# issue can it? Hopefully it's a common issue and someone will know what I've done.
Best Regards,
Mark