The string that is passed to ClientTemplate() is serialized directly on the client. This specifies what will be displayed in the Grid cell in preview mode. Thus, adding Html.Partial there will not work.
If you would like to display the Name property of Category I would suggest using the following approach:
columns.Bound(p => p.Category).ClientTemplate(
As for the custom editor - it should be defined in a partial View that is in the ~/Views/EditorTemplates
folder. The contents of the partial view would be similar to the following:
@(Html.Kendo().DropDownListFor(m => m)
The name of the partial view should match exactly the sting that is passed to UIHint
attribute to the Category
field in ProductViewModel
. For example, the above partial view will be named ClientCategory.cshtml
. And the Category field definition will look similar to this:
Using this approach you would be able to specify a custom editor for a field in the Grid.