jQWidgets Forums

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts

  • smitha
    Participant

    Hello Martin,

    My json data looks like this –
    [
    {
    “PartnerBudgetID”: 1,
    “Partner_BU_Name”: “Total”,
    “Last_Period_Sellout”: 114580032.999146998,
    “Sellout_Silver_Below”: 58468333.753999999,
    “Sellout_Gold_Platinum”: 210121574.957099996,
    “Unweighted_Sellout”: 268589908.711099995
    },
    {
    “PartnerBudgetID”: 1,
    “Partner_BU_Name”: “Total”,
    “BU_Name”: “Compute”,
    “Last_year_MGO_ROI”: 0.000000000,
    “Last_Period_Sellout”: 52496673.880600000,
    “Sellout_Silver_Below”: 20016546.380000000,
    “Sellout_Gold_Platinum”: 107800674.759999996,
    “Unweighted_Sellout”: 127817221.139999996
    }]
    And the column structure is as below –
    columns: any[] = [
    { text: ‘PartnerBudgetID’, pinned: true, dataField: ‘PartnerBudgetID’, width: 200 ,hidden:false},
    { text: ‘Partner Name’,pinned: true, dataField: ‘Partner_BU_Name’, width: 200, cellbeginedit: this.cellbeginedit },
    { text: ‘BU Name’,pinned: true, dataField: ‘BU_Name’, width: 200, cellbeginedit: this.cellbeginedit },
    { text: ‘PartnerID’, pinned: true, dataField: ‘PartnerID’, width: 200, cellbeginedit: this.cellbeginedit },
    { text: ‘1H18 MGO ROI’, dataField: ‘Last_year_MGO_ROI’, width: 100, cellbeginedit: this.cellbeginedit },
    { text: ‘Membership Type’, dataField: ‘Membership_Type’, width: 120, cellbeginedit: this.cellbeginedit },
    { text: ‘1H18 Weighted Sellout ($)’, dataField: ‘Last_Period_Sellout’, width: 120, cellbeginedit: this.cellbeginedit, cellsformat: ‘n’, hidden: true, aggregates: [‘sum’] },
    { text: ‘1H18 Sellout to Silver & Below’, dataField: ‘Sellout_Silver_Below’, width: 250, cellbeginedit: this.cellbeginedit, cellsformat: ‘n’, hidden: true, aggregates: [‘sum’] },
    { text: ‘1H18 Sellout to Platinum & Gold’, dataField: ‘Sellout_Gold_Platinum’, width: 120, cellbeginedit: this.cellbeginedit, cellsformat: ‘n’, hidden: true, aggregates: [‘sum’] },
    { text: ‘1H18 Unweighted Sellout”‘, dataField: ‘Unweighted_Sellout’, width: 150, cellbeginedit: this.cellbeginedit, cellsformat: ‘n’, hidden: true, aggregates: [‘sum’] }]

    what i need is when i group by using “Partner Name” column and expand the column called “BU Name” should not be displayed and the column called “Partner Name” should display the “BU Name” column values.

    Is it possible to bind datafield dynamically for a column with using grouping concept?


    smitha
    Participant

    Hello,

    I’m trying to create chart in the rendered method based on the rowid or rowdata.
    Is there any way to get the rowdata in the rendered method ?

    cellsRenderer: (row: any, column: any, value: any, rowData: any) => {
    let div = ‘<div id=”sparklineContainerMDF’ + row + ‘” style=”margin: 0; margin-bottom: 0; width: 100%; height: 40px;”>MDF</div><div id=”sparklineContainerSellout’ + row + ‘” style=”margin: 0; margin-bottom: 0; width: 100%; height: 40px;”>Sellout</div>’;
    if (rowData.IsEditable == true) {
    this.IsSparkline = ‘Yes’;
    return value + div;
    }
    else {
    this.IsSparkline = ‘No’;
    return value;
    }
    }
    }

    rendered = (): void => {
    if (this.dataSource != undefined && this.IsSparkline != ‘No’) {
    let sparklineMDF = [];
    let sparklineSellout = [];
    for (let i = 0; i < this.dataSource.length; i++) {
    if (this.dataSource[i].HistoryMDF != undefined && this.dataSource[i].HistoryMDF.length > 0) {
    for (let j = 0; j < this.dataSource[i].HistoryMDF.length; j++) {
    sparklineMDF.push(this.dataSource[i].HistoryMDF[j].MDF_1H);
    sparklineMDF.push(this.dataSource[i].HistoryMDF[j].MDF_2H);
    }
    }
    if (this.dataSource[i].HistorySellout != undefined && this.dataSource[i].HistorySellout.length > 0) {
    for (let j = 0; j < this.dataSource[i].HistorySellout.length; j++) {
    sparklineSellout.push(this.dataSource[i].HistorySellout[j].SellOut_Q1);
    sparklineSellout.push(this.dataSource[i].HistorySellout[j].SellOut_Q2);
    sparklineSellout.push(this.dataSource[i].HistorySellout[j].SellOut_Q3);
    sparklineSellout.push(this.dataSource[i].HistorySellout[j].SellOut_Q4);
    }
    }
    if (this.dataSource[i].IsEditable == true) {
    this.createSparkline(‘sparklineContainerMDF’ + this.dataSource[i].PartnerBudgetID, sparklineMDF, ‘line’);
    this.createSparkline(‘sparklineContainerSellout’ + this.dataSource[i].PartnerBudgetID, sparklineSellout, ‘line’);
    sparklineMDF = [];
    sparklineSellout = [];
    }
    else {
    sparklineMDF = [];
    sparklineSellout = [];
    }
    }
    }
    };
    Appreciate the help!
    Thank You.


    smitha
    Participant

    Thanks a lot Martin. That worked


    smitha
    Participant

    Thank You Martin.
    This resolved my issue, i’m able to get the button now.

    Is it possible to display the button only in child row and not in parent row in jqxtreegrid, i.e the button should be visible only when i expand the parent row.

    Appreciate the help!
    Thank You.


    smitha
    Participant

    Hello Hristo,

    Thank you for the response.
    After adding “import { jqxWindowComponent } from ‘jqwidgets-framework/jqwidgets-ts/angular_jqxwindow’;” in app.module.ts and app.component.ts the issue is resolved.


    smitha
    Participant

    Hello Hristo,

    Thank you for the response.
    I would like to display the chart on click of the parent node expansion event in the treegrid, i need to display the chart only in the child row and not in the parent row. In parent row i will have to display json data and only on expanding parent row i should display chart.
    Could please help on how to achieve this with jqxtreegrid and jqxchart.

    Apologies i will make sure to post in respective section in the future.

    Appreciate the help!
    Thank You.


    smitha
    Participant

    Hello Hristo,

    I’m using jqwidgets-framework version – 5.7.2 and Angular 6 framework components.
    If i try adding “import { WindowModule } from ‘node_modules/jqwidgets-framework/demos/angular/app/modules/window.module’;” in the app.module.ts i get the error stating “Cannot find module” but if i add “import { jqxWindowComponent } from ‘jqwidgets-framework/jqwidgets-ts/angular_jqxwindow’;” in app.module.ts it works fine.
    Could you please suggest whether adding “import { jqxWindowComponent } from ‘jqwidgets-framework/jqwidgets-ts/angular_jqxwindow’;” in app.module.ts and app.component.ts is correct way of doing it?

    Thank You.


    smitha
    Participant

    I resolved the issue using this.dataAdapter = new jqx.dataAdapter(this.source); again after this.source.localData


    smitha
    Participant

    I also tried what is mentioned in the post #98491, but still no hope.
    Appreciate the help !

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