Hello everybody
I have a grid with a detailtemplate. This detailtemplate contains also a grid.
My parent grid refers to an Edition-Model which contains many Articles. When the user expands an Edition-Row, the detailgrid contains all correct Articles.
The problem now is, that i want to check, if one Article is allready read by the user. So i want to insert a conclusion, that i can show one or another value in a column of the detailgrid.
On this website, i found the template-syntax: http://docs.kendoui.com/getting-started/framework/templates/overview#template-syntax
But it doesnt work fine. In the detailgrid the conclusion checks every time the parent-data (Edition) and not the detaildata (Article).
My ClientTemplate (for the detail grid)
When i put an output in the ClientTemplate as shown in the link above, then the Template renders the correct data (with the \\# syntax)
Example (clienttemplate for the detail grid):
My question now: How can I check the data of the detailrow in a conclusion??
Edit:
For better understanding: I have the sam CSharp - Model in both Grids. When i make two diffrent models, then it is the same situation. Only one diffrence: Javascript-Console says: Undifined Property (for IsRead). Because my actual Edition - Model has no property named IsRerad.
Thanks and have a nice day
MJ
I have a grid with a detailtemplate. This detailtemplate contains also a grid.
My parent grid refers to an Edition-Model which contains many Articles. When the user expands an Edition-Row, the detailgrid contains all correct Articles.
The problem now is, that i want to check, if one Article is allready read by the user. So i want to insert a conclusion, that i can show one or another value in a column of the detailgrid.
On this website, i found the template-syntax: http://docs.kendoui.com/getting-started/framework/templates/overview#template-syntax
But it doesnt work fine. In the detailgrid the conclusion checks every time the parent-data (Edition) and not the detaildata (Article).
My ClientTemplate (for the detail grid)
columns.Bound(c => c.IsRead).ClientTemplate("" + "#if(IsRead== true) {#" + "Read"+ "#} else{#" + "Not Read + "#}#") .Title("State").Width(120);When i put an output in the ClientTemplate as shown in the link above, then the Template renders the correct data (with the \\# syntax)
Example (clienttemplate for the detail grid):
columns.Bound(c => c.IsRead).ClientTemplate("" + "#if(IsRead== true) {#" + "#=data.Id#"+ // Shows parent Id "#} else{#" + "\\#=data.Id\\# + // Shows the correct id from the detail row "#}#") .Title("State").Width(120);Edit:
For better understanding: I have the sam CSharp - Model in both Grids. When i make two diffrent models, then it is the same situation. Only one diffrence: Javascript-Console says: Undifined Property (for IsRead). Because my actual Edition - Model has no property named IsRerad.
Thanks and have a nice day
MJ