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

concatenating a string with @item.ID in column template

1 Answer 361 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Avitot
Top achievements
Rank 1
Avitot asked on 03 Aug 2012, 08:38 AM
I am using ASP.NET kendo grid helper and server binding. I want to have an anchor element with its id is the concatenated string text and the dynamic value of @item.ID, so I have something like:
cols.Bound(p => p.ID)
   .Template(@<text><a id="Foo_\@item.ID" href= "#someLink" > @item.ID </a></text>);

this code works and:

.Template(@<text><a id="@item.ID" href= "#someLink" > @item.ID </a></text>);

using bare @item.ID or with "\" or "/" or "-" and other symbols, its value is dynamic indeed,
BUT if I instead use just "Foo_@item.ID", the id resulted is as is -> "Foo_@item.ID"

What should I code in order to properly concatenate strings with @item.ID in a column template?
Thanks!

1 Answer, 1 is accepted

Sort by
0
Avitot
Top achievements
Rank 1
answered on 06 Aug 2012, 03:14 AM
I already solved it. but thanks anyway :)
Tags
Grid
Asked by
Avitot
Top achievements
Rank 1
Answers by
Avitot
Top achievements
Rank 1
Share this question
or