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

[Solved] ClientTemplate, Razor, Visual Basic

1 Answer 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rhek
Top achievements
Rank 1
Rhek asked on 11 Aug 2011, 08:04 PM

Hello,

I really need some help with converting a line of code from a Telerik grid example. I have been converting a Telerik code example application that was written in C# using the Razor engine to Visual Basic with the Razor engine.

http://www.telerik.com/community/code-library/aspnet-mvc/grid/batch-editing-with-combobox-editor-template.aspx

I have it all converted, but 1 line. I am having problems with he code inside of the ClientTemplate. Since I am using the Razor engine the "<#=" is not valid, but everything I try does not work.

Here is the line of code:

    columns.Bound(Function(o) o.Employee).ClientTemplate("<#= Employee.FirstName + \" \" + Employee.LastName #>")

The line of code is for a dropdownlist in a Telerik grid. When I change the code to "<#= Employee.FirstName & "" "" & Employee.LastName #>" the grid will display, but the value displayed is not the employee name, but a zero which is the default employee id since an employee has not been selected yet.

I am sure this is simple, but I have spent a couple days trying to get this working. Your help is appreciated.

Rhek

1 Answer, 1 is accepted

Sort by
0
Rhek
Top achievements
Rank 1
answered on 12 Aug 2011, 04:14 AM
Let me try another approach to this problem of mine...

Does anyone have some sample code or point me to some documentation on how to use Clienttemplate in a MVC3 application using the Telerik Combobox inside a Telerik Grid, the Razor engine and Visual Basic? I have searched and searched and cannot find anything.

Thanks,
Rhek
Tags
Grid
Asked by
Rhek
Top achievements
Rank 1
Answers by
Rhek
Top achievements
Rank 1
Share this question
or