Hi,
I am trying to display the a hyperlink for one of the columns in my Grid. I added a template column as per the documentation and it is not displaying any content.
I check the server response. It does return the data. The column is disappearing on the client side once tied to the Grid.
Below is the snippet from MVC Grid examples (local-data-binding). I modified a bit to add a template column. You can easily reproduce this by adding the first column to the example at Grid at local-data-binding example.
Any suggestions. Looks like this is working for some people.
Thank You,
I am trying to display the a hyperlink for one of the columns in my Grid. I added a template column as per the documentation and it is not displaying any content.
I check the server response. It does return the data. The column is disappearing on the client side once tied to the Grid.
Below is the snippet from MVC Grid examples (local-data-binding). I modified a bit to add a template column. You can easily reproduce this by adding the first column to the example at Grid at local-data-binding example.
@model IEnumerable<Kendo.Mvc.Examples.Models.ProductViewModel>
@(Html.Kendo().Grid(Model)
.Name(
"Grid"
)
.Columns(columns =>
{
columns.Template(@<text>
@Html.ActionLink(item.ProductName,
"Local_Data_Binding"
,
"Grid"
,
new
{ id = item.ProductName },
null
)
</text>).Title(
"Company Name"
);
columns.Bound(p => p.ProductName).Title(
"Product Name"
);
columns.Bound(p => p.UnitPrice).Title(
"Unit Price"
).Width(130);
columns.Bound(p => p.UnitsInStock).Title(
"Units In Stock"
).Width(130);
columns.Bound(p => p.Discontinued).Width(130);
})
.Pageable()
.Sortable()
.Scrollable(scr=>scr.Height(430))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(
false
)
)
)
Any suggestions. Looks like this is working for some people.
Thank You,