This question is locked. New answers and comments are not allowed.
i have been trying to use the columns.Template feature of telerik grid but for some reason it doesn't display anything it only shows the column but there's nothing in it. am i missing something?
UPDATE:
it seems that it works now but when i try using ajax data binding the columns.template will only show on the 1st load, if i try clicking the refresh button of the telerik grid all the columns.template will disappear.
if i use it like this:
@( Html.Telerik().Grid(Model) .Name("Orders") .Columns(columns => { //Column which will display the ProductID property of the Product columns.Bound(o => o.ProductID); columns.Bound(o => o.ProductName).Title("Product"); //Template column which shows an action link columns.Template(o => { @Html.ActionLink("Edit", "Edit", new { id = o.ProductID }; }).Title("Edit"); }) )UPDATE:
it seems that it works now but when i try using ajax data binding the columns.template will only show on the 1st load, if i try clicking the refresh button of the telerik grid all the columns.template will disappear.
if i use it like this:
@( Html.Telerik().Grid(Model) .Name("Orders") .DataKeys(keys =>
{
keys.Add(c => c.ProductID);
})
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("_SelectAjaxEditing", "Home")) .Columns(columns => { //Column which will display the ProductID property of the Product columns.Bound(o => o.ProductID); columns.Bound(o => o.ProductName).Title("Product"); //Template column which shows an action link columns.Template(o => { @Html.ActionLink("Edit", "Edit", new { id = o.ProductID }; }).Title("Edit"); }) )