How to get Value of Measure Cell in WIjmo Olap

Posted by: jignesh.jain on 20 November 2018, 2:10 am EST

    • Post Options:
    • Link

    Posted 20 November 2018, 2:10 am EST

    Hi Team,

    I am not able to get the value of Measure Cell for eg. As shown in the image

    I am using the following fiddle as reference to achieve custom sorting icons.

    
     s.itemFormatter = function (panel, r, c, cell, e) {
                                if (panel.cellType == 4) {
    //This gives me cell value of ROW
                                    var field = scope.cvGroup.fields.getField(cell.innerHTML)
    };
    //How to get cell value for MEasure
    

    Thanks,

    Jignesh Jain

  • Posted 20 November 2018, 4:29 pm EST

    Hi,

    For column headers, you may use the currentSort property to determine the current sort order of column and append the required custom icon.

    Please refer to the following updated sample to add custom sorting icons:

    http://jsfiddle.net/dtoL8nz3/

    ~Sharad

  • Posted 21 November 2018, 2:54 am EST

    Hi Sharad,

    Appreciate your quick response.

    With reference to your above fiddle, Is it possible that i can apply custom sort icons only to the row headers with “Grand Total”.

    for eg. I want sort icons on ‘Sales’ and ‘Expenses’ which belong to ‘Grand Total’.

    Thanks,

    Jignesh

  • Posted 21 November 2018, 3:46 pm EST

    In this case, you may attach a handler to the formatItem event instead of using itemFormatter and then check if the cell has ‘wj-aggregate’ class to differentiate between grand total normal cells.

    Please refer to the following updated fiddle: http://jsfiddle.net/tmcjw4r2/

    More on formatItem: https://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.grid.FlexGrid.Class.html#formatItem

    ~Sharad

  • Posted 21 November 2018, 10:56 pm EST

    Hi Sharad,

    The above solution worked for me.

    But if I have multiple fields in column in columnfields for eg. columnFields: ‘Product,Expenditure’ , I am still able to get the custom icons on all the ‘Sales’ and ‘Expenses’ cell.

    Is it possible to get custom sort icons on ‘Sales’ and ‘Expenses’ which belong to ‘Grand Total’. ?

    For reference,

    http://jsfiddle.net/qadh5jwy/

    Thanks,

    Jignesh

  • Posted 25 November 2018, 4:51 pm EST

    Hi Jignesh,

    We were able to replicate the issue at our end and hence it has been forwarded to the concerned team for further investigation(Internal tracking ID: 355176).

    Till then instead of checking for ‘wj-aggregate’ class you may compare the current columnIndex against the length of valueFields.

    Please refer to the following updated fiddle: http://jsfiddle.net/902gk5vc/

    Thanks for reporting.

  • Posted 26 November 2018, 6:19 pm EST

    Hi Sharad,

    Thanks for the workaround. We can work with it for now, but in order to go to production, we would need the fix.

    It would be helpful, if you can provide us with a date by when the fix would be available, so that we can plan our Production release accordingly.

    Thanks,

    Jignesh

  • Posted 6 December 2018, 3:25 pm EST

    Hi Sharad,

    Any updates on the above fixes?

  • Posted 9 December 2018, 4:08 pm EST

    Hi,

    The issue has been fixed in the nightly build and will be included in the next stable release.

    You may confirm the same from the following sample which uses the nightly build: http://jsfiddle.net/8mw3vhjx/

    Please note that nightly builds are not tested for production and should not be used in production environment.

    Regards

  • Posted 14 December 2018, 12:43 am EST

    Hi Sharad,

    Thanks for the update.

Need extra support?

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

Learn More

Forum Channels