jQWidgets Forums

jQuery UI Widgets Forums Angular PivotGrid Theme

This topic contains 3 replies, has 2 voices, and was last updated by  Gary 7 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • PivotGrid Theme #99904

    Gary
    Participant

    I was unable to change the theme on PivotGrid by using [theme]=’energyblue’.
    I checked angular_jqxpivotgrid.ts and did not see an @Input definition.

    Using JQWIDGETS build 5.7.2. I see it working in Angular demos for PivotGrid.

    Thanks,
    Gary

    PivotGrid Theme #99919

    Peter Stoev
    Keymaster

    Hi Gary,

    You can use the createComponent method to create a pivot grid on demand and set its “theme” property in the options param.

    Regards,
    Peter

    PivotGrid Theme #99931

    Gary
    Participant

    Peter,

    Works.

    Thanks,
    Gary

    PivotGrid Theme #99934

    Gary
    Participant

    Peter,

    Have error with createComponent with PivotGrid. I copied the code from the example under PivotGrid GetStarted for createComponent.

    I get the following message from Typescript:

    Error:(23, 9) TS2322: Type ‘{ width: number; heigth: number; theme: string; source: null; multipleSelectionEnabled: true; tre…’ is not assignable to type ‘PivotGridOptions’.
    Object literal may only specify known properties, and ‘width’ does not exist in type ‘PivotGridOptions’.

    After looking around jqwidgets.ts for PivotGridOptions I don’t see the definitions. I compared to GridOptions and not built out the same.

    pivotGridSettings: jqwidgets.PivotGridOptions = {
    width: 800,
    heigth: 400,
    theme: ‘energyblue’,
    source: this.pivotDataSource,
    multipleSelectionEnabled: true,
    treeStyleRows: true,
    autoResize: false,
    };

    When I said it was working before I did something that worked but, not what you had recommended above. The following code works if I place in the
    Angular Lifecycle ngAfterViewInit(). Clearly not what you recommended. :))

    ngAfterViewInit(): void {
    this.pivotGrid1.setOptions({
    theme: ‘energyblue’
    });
    }

    Regards,
    Gary

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.