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

[Solved] "dataItem" Undefined in Detail Grid

0 Answers 485 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Theo
Top achievements
Rank 1
Theo asked on 26 Nov 2014, 08:23 AM
I am testing how well KendoUI works with bootstrap/ angularjs by embedding the example at  http://demos.telerik.com/kendo-ui/grid/angular exactly as is (the AngularJS version that is, except for placing the controller definition into my app.js file) into a boostrap template bought off-the-shelf. 

The result is firstly that the container of detail grid is being placed above the main grid (instead of appearing under the expanded row of the main grid). More importantly, the detail grid does not show up at all and when I check the console, the error message is "TypeError: Cannot read property 'EmployeeID' of undefined". Now EmployeeID is meant to be a property of dataItem which means it is not defined. 

Troubleshooting this I set the filter as follows 

filter: { field: "EmployeeID", operator: "eq", value: 1 }

(i.e. I replaced dataItem.EmployeeID with the value of 1 to see the effect when there is no dependence on the dataItem object).

The result I observe is as follows:
1) the detail grid loads up ahead of the main grid 
2) the detail grid is placed on top of the main grid (rather than inlined under an expanded row of the main)
3) ALL records are returned into the detailGrid instead of the ones having EmployeeID of 1).

I have been stuck on this for 3 days and my ticket on support not responded to in the past 2 days. I need some guidance troubleshooting this as I understand from documentation that AngularJS and KendoUI should work seamlessly and using a customized boostrap template should at worst cause some misalignment of visual elements rather than outright failure of replicated code logic working.


No answers yet. Maybe you can help?

Tags
Grid
Asked by
Theo
Top achievements
Rank 1
Share this question
or