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

pivotgrid template and angularjs not working together

8 Answers 191 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
ron
Top achievements
Rank 1
ron asked on 14 Jan 2018, 09:28 AM

hey, i'm ecaluating the pivot grid using the trial version. i seem to have problems getting angularjs and the pivot templates to work together.

my script imports in the index are as follows: 

  <script src="bower_components/jquery/jquery.js"></script>
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/kendo-ui/js/kendo.all.min.js"></script>

in the HTML page i have: 

    <div class="col-md-12" ng-if="vm.data.HeatChartSkillsPerResource && vm.data.HeatChartSkillsPerResource.length > 0">
        <kendo-pivot-grid  k-data-source="vm.dataSource" k-options="vm.options" id="pivotgrid" class="hidden-on-narrow">
            <div k-column-header-template>
                {{member.caption}}
            </div>
        </kendo-pivot-grid>

in the relevant controller: 

 

    vm.dataSource = new kendo.data.PivotDataSource({
                    data: vm.gridOptions.data,
                    schema: {
                        model: {
                            fields: {
                                FullName: {
                                    type: 'string'
                                },
                                skill_rating: {
                                    type: 'number'
                                },
                                skill_name: {
                                    field: 'Skill.SkillName'
                                },
                                Category: {
                                    field: 'Skill.Category'
                                }
                            }
                        },
                        cube: {
                            dimensions: {
                                FullName: {
                                    caption: 'Resources'
                                },
                                Category: {
                                    caption: 'Categories'
                                },
                                skill_name: {
                                    caption: 'Skills'
                                }
                            },
                            measures: {
                                'Average': {
                                    field: 'skill_rating', aggregate: 'average'
                                }
                            }
                        }
                    },
                    columns: [{ name: 'FullName', expand: true }],
                    rows: [{ name: 'Category', expand: true }, { name: 'skill_name', expand: true }],
                    measures: ['Average']
                });

 

        vm.options = {
            columnWidth: 100,
            height: 500,
            filterable: true,
            sortable: true,
            reorderable: false
        }

 

the data is loaded as expected but column header templates (or any other templates) don't recognize angularjs. what i see is {{member.caption}} inside the headers. (as in the attached file).

i don't see any errors.

any help on that?

8 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Jan 2018, 12:16 PM
Hello, Ron,

Thank you for reporting this.

This is a known issue which is already added to our internal backlog. I have raised its priority, but please have in mind that it is a complex scenario.

Currently, we can suggest using the Kendo UI template syntax for setting the template:

$scope.options = {
          columnHeaderTemplate: "#=member.caption#",

Apologies for the inconvenience this may have caused you.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
ron
Top achievements
Rank 1
answered on 29 Jan 2018, 09:13 AM

but what if i need something more complex, with angular directives and accessing data from a controller?

is there any progress on this issue?

because i see angular is used inside the templates of other components like the list view.

is there a problem with trial version maybe?

0
Stefan
Telerik team
answered on 30 Jan 2018, 11:54 AM
Hello, Ron,

I do understand that the suggested approach has its limitations, but currently, it is the supported one due to the mentioned issue.

The issue is a complex one and it is covering more than one widget.

Please have in mind that as the Angular team is mostly working on Angular 2+, we are also focusing our efforts on improving our Angular 2+ suite and the ETA for fixing this one may vary depending on the community demand.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
ron
Top achievements
Rank 1
answered on 08 Feb 2018, 08:10 AM
is this issue specific to the PivotGrid? because is see angularjs is used in the templates on the demos of other components
0
Stefan
Telerik team
answered on 09 Feb 2018, 11:48 AM
Hello, Ron,

The issue is for these controls and some of them supported it partially:

- AutoComplete
- Calendar
- ComboBox
- DatePicker
- DateTimePicker
- DropDownList 
- ListView
- MultiSelect
- PivotGrid
- Scheduler
- TreeList
- TreeView



Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
ron
Top achievements
Rank 1
answered on 11 Feb 2018, 06:56 AM
well that's just NOT OK of you guys to say in the documentation that angularjs is supported for these controllers, give examples of templates and than this....
0
ron
Top achievements
Rank 1
answered on 11 Feb 2018, 06:58 AM
this https://docs.telerik.com/kendo-ui/AngularJS/introduction#template-directives documentation is very misleading!
0
Pavlina
Telerik team
answered on 13 Feb 2018, 05:03 PM
Hello,

Thank you for your feedback. We will edit the misleading section of the documentation and the tutorial will showcase the workaround suggested by my colleague Stefan as a temporary solution until the issue is resolved. Additionally we will do our best to resolve the problem with the wrong Angular Template as soon as possible.

Please excuse us once again for the inconvenience caused by this bug.

Regards,
Pavlina
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PivotGrid
Asked by
ron
Top achievements
Rank 1
Answers by
Stefan
Telerik team
ron
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or