Need help on how to generate the dataset for multi-row grid

Posted by: nilesh_nichal on 16 October 2018, 5:01 pm EST

    • Post Options:
    • Link

    Posted 16 October 2018, 5:01 pm EST - Updated 3 October 2022, 11:20 am EST

    Hi,

    We need a help on how to generate a dataset with a multirow grid. As we are unable to find any reference in sample link for the hierarchical data set object of the multirow grid which is injected from data services in the sample code.

    Basically, we are expecting which kind of object literal structure is required to render the multirow grid.

    Please do see Fully Expanded Column Headers section in below link :

    https://demos.wijmo.com/5/Angular2/MultiRowIntro/MultiRowIntro/

    Attaching screenshots for reference.

  • Posted 17 October 2018, 6:38 pm EST

    Hi,

    The basic data structure for the above sample is of type array of objects like:

    orders = [

    {

    orderId: id,

    amount: anount,

    customer: {

    name: c_name

    },

    shipper: {

    name: s_name

    }

    },

    {

    orderId: id,

    amount: anount,

    customer: {

    name: c_name

    },

    shipper: {

    name: s_name

    }

    },

    … other orders

    ]

    You may also find the source code for the given sample here:

    https://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/MultiRowIntro/Angular2/Code

    ~Sharad

  • Posted 18 October 2018, 9:16 pm EST

    Thanks for the reply. One more I’m trying to export multi-row grid to an excel sheet but I am getting following error.

    Code :

    HTML CODE:

    <wj-multi-row #multiGrid [itemsSource]=“orders” [layoutDefinition]=“gridLayoutDef”>

    TypeScript:

    @ViewChild(‘multiGrid’) grid:wjcMultiRow.MultiRow;

    wjcGridXlsx.FlexGridXlsxConverter.save(this.grid, { includeColumnHeaders: true, includeCellStyles: true }, ‘FlexGrid.xlsx’);

    Error:

    AuditSingleEditComponent.html:26 ERROR TypeError: h is not a constructor

    at Function.n._saveWorkbookToZip (wijmo.xlsx.js:13)

    at Function.n.save (wijmo.xlsx.js:13)

    at n.save (wijmo.xlsx.js:13)

    at Function.n.save (wijmo.grid.xlsx.js:13)

    at AuditSingleEditComponent.exportExcel (audit.single.edit.component.ts:96)

    at Object.eval [as handleEvent] (AuditSingleEditComponent.html:26)

    at handleEvent (core.es5.js:11998)

    at callWithDebugContext (core.es5.js:13467)

    at Object.debugHandleEvent [as handleEvent] (core.es5.js:13055)

    at dispatchEvent (core.es5.js:8614)

    Please assist.

  • Posted 21 October 2018, 5:02 pm EST

    We are unable to replicate the issue at our end, could you please have a look at the following sample(used for testing) and let us know if we are missing something to replicate the issue:

    https://stackblitz.com/edit/angular-ayjxjp?file=app%2Fapp.component.ts

    Could you please share your environment info such as Wijmo build number, OS, browser, any framework you are using, so that we may test on the same environment.

    ~Sharad

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels