The Kendo UI Grid provides a versatile Detail Template that allows you to display details in a grid format, or any layout and content you want. If you are using Kendo MVVM binding (data-bind attributes), you might find one surprising shortcoming: by default, none of the bindings in the detail template work.
The primary reason for this is that the detail template is not included when you perform a kendo.bind() on the parent elements (although I think this is something that SHOULD happen by default).
The solution is quite simple, especially if your detail template is binding to the same object as the parent row or a child collection of the parent row. When we construct the grid, we simply need to handle the detailInit event and bind the detail template using the e.detailRow object as our container and e.data as the parent data object:
View all the code in this JSFiddle and try it with and without the detailInit code to see how it affects the phone numbers in the detail template:
Latest posts by Falafel Posts (see all)
- Matching Complex Query String Rewrite Rule in IIS - March 22, 2017
- Using Google Services in UWP C# Apps – Part 2 - February 7, 2017
- Using Google Services in UWP C# Apps – Part 1 - February 6, 2017
- Redis Caching in the Google Cloud Platform - February 3, 2017
- Entity Framework with Google Cloud SQL - February 2, 2017