This question is locked. New answers and comments are not allowed.
The grid is in a partial view loaded in a tabstrip using LoadContentFrom. The tabstrip itself is in a partial view too. I understand that Template and ClientTemplate must be defined on each column because the grid is loaded by ajax using DataBinding.
My code:
The grid loads fine however when I view subsequent pages the rows are empty. Without ClientTemplate I get an internal server error. Without the ClientTemplate I get nothing in the respective cells but the rest of the grid renders fine. When using Template, the html defined in the Template property is used. ClientTemplate seems to be ignored although it is needed.
Going back to the GridAndTabStrip example, I've updated it to the latest version and implemented something analagous to my main project to replicate the problem. See the ~/Home/Create.
1) It fails with internal server error if I use DataBinding on the grid (in GridLoadOnDemand) instead of Ajax.
2) Paging on the grid fails to correctly load grid content if the column.Template property is not defined.
3) Internal server error if ClientTemplate only is defined which I believe is a known issue.
Any thoughts on how I can get this working please?
Thanks
Matt
My code:
<% Html.Telerik().Grid(Model) .Name("TheGrid") .Columns(columns => { columns.Bound(c => c.Id) .Template(c => { %> <%= Html.ActionLink("Edit", "Edit", "Home", new { id = c.Id }, new object { })%> <% }) .ClientTemplate("<a href='~/Home/Edit/<# Id #>'>Edit</a>") .Title("Edit"); columns.Bound(c => c.Id) .Template(c => { %> <%= Html.ActionLink("Details", "Show", "Home", new { id = c.Id }, new object { })%> <% }) .ClientTemplate("<a href='~/Home/Show/<# Id #>'>Details</a>") .Title("Details"); columns.Bound(c => c.Id) .Template(c => { %> <% Html.BeginForm("AjaxDelete", "Home", new { id = c.Id }); %> <%= Html.AntiForgeryToken()%> <input type="submit" value="Delete" class="DeleteAction" /> <% Html.EndForm(); %> <% }) .ClientTemplate("<button id='deletebtn<# Id #>' rel='<# Id #>' onclick='delete(this, <# Id #>)'>Delete</button>") .Title("Delete"); columns.Bound(p => p.Name); columns.Bound(p => p.Created); }) .DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding", "Home")) .Pageable() .Sortable() .Render();%>The grid loads fine however when I view subsequent pages the rows are empty. Without ClientTemplate I get an internal server error. Without the ClientTemplate I get nothing in the respective cells but the rest of the grid renders fine. When using Template, the html defined in the Template property is used. ClientTemplate seems to be ignored although it is needed.
Going back to the GridAndTabStrip example, I've updated it to the latest version and implemented something analagous to my main project to replicate the problem. See the ~/Home/Create.
1) It fails with internal server error if I use DataBinding on the grid (in GridLoadOnDemand) instead of Ajax.
2) Paging on the grid fails to correctly load grid content if the column.Template property is not defined.
3) Internal server error if ClientTemplate only is defined which I believe is a known issue.
Any thoughts on how I can get this working please?
Thanks
Matt