This is a migrated thread and some comments may be shown as answers.

Template Column In Grid

1 Answer 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gaetano
Top achievements
Rank 1
Gaetano asked on 25 Mar 2013, 04:58 PM
Why this code dosn't  work properly.
My grid show the IDArticolo property and not the text "HELLO WORLD"!!!!!  See the attached picture.

<%: Html.Kendo().Grid(Model) _
.Name("Grid") _
.Columns(Sub(column) column.Bound(Function(art) art.idarticolo).ClientTemplate("<span>HELLO WORLD</span>")) _
.Columns(Sub(o) o.Command(Sub(cmd) cmd.Custom("Dettaglio").Action("articolodettaglio", "articolo").DataRouteValues(Sub(va) va.Add(Function(da) da.idarticolo).RouteKey("idarticolo")))) _
 .Pageable(Sub(o) o.PageSizes(True)) _
.Sortable() _
.Filterable() _
.DataSource(Sub(ds) ds.Server().PageSize(10))
%>

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 26 Mar 2013, 12:32 PM
Hello Gaetano,


In the current scenario the Grid is using a Server binding, so to specify a template for a column, you should use a Server Template instead of Client Template.
E.g.
columns.Bound(p => p.ProductID).Template(@<text>Hello World</text>);

 

Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Gaetano
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or