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
- Disable Content Filters in Sitefinity - March 8, 2017
- On Sitefinity Custom Widget Caching - February 22, 2017
- Dynamic Content Detail Widget Templates in Sitefinity - February 8, 2017
- Using Google Services in UWP C# Apps – Part 2 - February 7, 2017