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

Problem binding data-columns with detailInit event on declarative grid

2 Answers 309 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 02 Oct 2012, 01:15 AM
Hi, 

Considering this grid:
http://jsfiddle.net/raaaT/

It has these features:
  •   Detail grid
  •   selected simulated by checkbox
  •   Hierarchical check (using html5 intermediate property)
This features was implemented using commom jquery code, kendo grid, etc...
The source is provided by a kendo.DataSource as well, but its just a simple array here to simplificate.

Now, I need to calculate the Item Price using the sum of selected Sub Items...
I start to move this code to MVVM approach:
http://jsfiddle.net/3hxLH/

Its all ok when I set detailInit event, kendo create a new column with the link to open detail grid:
http://jsfiddle.net/fparG/

But, when I start to set data-columns, I lost this functionality:
http://jsfiddle.net/gADtG/

If I set data-columns property on div, the event detailInit is ignored (or something). The same issue occurs if I use data-row-template option.

How to reproduce the first example using MVVM (including hierarchical check functionality)?

thanks, and sorry for my poor english...

2 Answers, 1 is accepted

Sort by
0
Darryl
Top achievements
Rank 1
answered on 14 Dec 2012, 01:51 AM
Keen to hear an answer on this.

Is a declarative hierarchy grid not possible?
0
Nikolay Rusev
Telerik team
answered on 17 Dec 2012, 09:54 AM
Hello Darryl,

You should define detail template attribute in order to initialize hierarchical grid with MVVM. For example:
http://jsbin.com/ayipey/1/edit

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
MVVM
Asked by
William
Top achievements
Rank 1
Answers by
Darryl
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or