Assertion failed in Wijmo: Integer expected

Posted by: chandrasekar_keerthana on 19 November 2018, 6:24 am EST

    • Post Options:
    • Link

    Posted 19 November 2018, 6:24 am EST - Updated 3 October 2022, 8:14 pm EST

    I have a bound sheet with three rows added by default with a number of columns. After populating a column(type Number)-col1 with a set of numbers and sorting it, I entered values in two other columns(Number type)-col2 & col3 and used a formula in a third column(Number type)-col4, to refer the values from cells under col2 and col3 (=col2+col3). Now if I sort col2/col3, i get the following error in the browser console. Please help me figure out what’s happening.

    Attached screenshot with error.

    Thanks,

    Keerthana

  • Posted 20 November 2018, 12:46 am EST

    Hi Keerthana,

    The issue was a regression(Internal tracking Id: 342650) in version 5.20182.523 which is now fixed in the latest release 5.20183.550.

    You may confirm the same from the following fiddle which uses the latest version: https://jsfiddle.net/v57sq1m9/

    Please update to the latest version.

    We apologize for the inconvenience caused.

    Regards

    Sharad

  • Posted 20 November 2018, 6:53 am EST

    Hello Sharad,

    Thanks for the quick turn around. Please let me know if 5.20183.550 is a stable version or nightly build.

    Regards,

    Keerthana

  • Posted 21 November 2018, 12:13 am EST

    Build 5.20183.550 is a release build, you may download it from npm using the command ‘npm install wijmo’.

    Or you may also use wijmo’s cdn to refer to wijmo. Please refer to this doc for more info: https://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/static/references.html

    You may read more about the changes and improvements in the latest version(5.20183.550) here:

    https://www.grapecity.com/en/blogs/wijmo-2018v3-landed

    ~Sharad

  • Posted 21 November 2018, 7:45 am EST

    Hi Sharad,

    I have downloaded the version(5.20183.550) and integrated with my application. But I see a couple of issues with it:

    1. While saving the data from flexsheet to database, if a cell has formula in it, the first time it gets saved properly. If the value in the cells referred is changed, the cell holding formula displays the updated value, but it is not saved to DB. It seems to have the old value. To handle this, we used the getCellData() method to get the value from cell and assign back to the itemsource.

      But in the latest release, after sort the itemsource doesn’t seem to have sorted data, so this seems to mess up the values while we try to assign values again after celledit.

    2. After sorting a column containing formula, the formula is updated the first time based on the sort position. But on sorting the column for a second time, the formula isn’t updated. It keeps pointing to the cells from previous sort.

    Any clue on how to handle it?

    Thanks,

    Keerthana

  • Posted 22 November 2018, 4:33 am EST

    1). You may iterate over the rows of the flexsheet and generate a collection of updated values before saving data to the DB. Also, we would request you to use getCellValue() method instead of getCellData() to get the evaluated value of the formula.

    Please refer to the following sample: https://stackblitz.com/edit/js-ittufx?file=index.js

    2). We are able to replicate the issue at our end and hence it has been forwarded(Internal tracking ID: 354953) to the concerned team for further investigation. We will let you know about any updates regarding the issue.

    Sorry for the inconvenience caused.

    ~Sharad

  • Posted 22 November 2018, 6:52 am EST

    Thanks a lot for the reply Sharad.

    Two more questions:

    1. Is there a way to get the sorted data source from the flexsheet once the data is sorted?
    2. I have a requirement to hide columns(to reduce the width of the column like in excel). I want to provide a hide icon in the columns. Is it possible to add a custom icon just beside the filter icon present at the top of the sheet column header row(with the alphabets)?
  • Posted 26 November 2018, 1:03 am EST

    1). You may use items property of collectionView to get the current state/sorted data.

    Please refer to the following sample: https://stackblitz.com/edit/js-nxjncd?file=index.js

    2). You may easily create the column picker using the ListBox control, please refer to the above sample which demonstrates the same.

    ~Sharad

  • Posted 28 December 2018, 8:10 am EST

    Hi Keerthana,

    The issue with the formula update in flexSheet after sorting for 2nd time has been fixed in the nightly build(5.20183.563-rc) and will be included in the next stable release.

    You may confirm the same from the following sample which uses the nightly build: https://stackblitz.com/edit/js-fvhatw?file=index.js

    Note: Nightly builds are not tested for production and should not be included in the production build.

    Regards

Need extra support?

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

Learn More

Forum Channels