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

The model that ClientDetailTemplateId uses

1 Answer 1241 Views
Templates
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 29 Jun 2016, 03:35 PM

We have a grid 

@(Html.Kendo().Grid<PatientRecord>(Model.WorklistPatientRecords)

that has a ClientTemplateId

.ClientDetailTemplateId("grid-details-form")

Where "grid-details-form" id is in 

 

@{ Html.RenderPartial("_DiagnosisRecordComments"); 

 

The implied model for the partial that makes up the ClientTemplate is obviously PatientRecord

Now within _DiagnosisRecordComments I have some code that looks like the following

     #

new AcmeGroup.ValidationComments(ValidationCommentsViewModel);

#

ValidationCommentsViewModel is a property of PatientRecord and that works fine.

 

The problem is that I want to pass PatientRecord itself....the actual implied model that is used by the client template/Partial.  If I use 

 

     #
new AcmeGroup.ValidationComments(PatientRecord);
#

I get an error.

What name do I use for the actual implied model that ClientDetailTemplate actually uses?

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 01 Jul 2016, 02:24 PM
Hi James,

The client detail template uses a model that is passed on the client (from the expanded master row) and is only available inside the client-side Kendo UI template markup. This is shown in the following demo:

http://demos.telerik.com/aspnet-mvc/grid/hierarchy

I am afraid it is not possible to use this model in server-side expressions.

Regards,
Dimo
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Templates
Asked by
James
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or