Adding data to wijmo flexsheet itemsource, first row getting blank

Posted by: reeshabh.choudhary on 9 April 2019, 1:13 am EST

  • Posted 9 April 2019, 1:13 am EST - Updated 3 October 2022, 11:05 am EST

    Please look at the code snippet, about how we are adding data to itemsource.

    But, my data count is 22 but rows being formed are 23.

  • Posted 9 April 2019, 1:13 am EST

    please find the snapshot:

  • Posted 9 April 2019, 1:14 am EST

    And since 1st row which is extra is coming empty, out grid is displayed as follows:

  • Posted 9 April 2019, 1:15 am EST - Updated 3 October 2022, 11:05 am EST

  • Posted 9 April 2019, 1:15 am EST - Updated 3 October 2022, 11:05 am EST

  • Posted 9 April 2019, 4:34 pm EST

    When I am assigning data to flexsheet itemsSource in constructor, each row is being assigned a data item but when I assign data to flexsheet in flexinit() method, dataitem is not assigned. Please kindly explain.

  • Posted 10 April 2019, 1:29 am EST

    Hello,

    The empty row, in the beginning, is the header row. You have already assigned a data source to the sheet but columns are not generated until you loop through the metricDataObject so column headers are not defined and the first row is empty.

    To solve this issue, you can just remove the first row using the shift() method. Please refer to the sample below:

    https://stackblitz.com/edit/angular-xfx9fr

    dataItem not assigned

    We are still looking into the issue. We will update you as soon as possible.

  • Posted 10 April 2019, 9:37 pm EST

    No, I already have a header row and showing header. it seems to be a duplicate header row.

    ->> dataitem:

    And if you analyze the code closely, you will get to know, ItemsSource remains null. I have already raised a separate ticket for this.

  • Posted 11 April 2019, 9:06 pm EST

    This is the expected behavior of flex sheet. When we assign a data source to FlexSheet, it gets assigned to the selected sheet of FlexSheet and it is formatted as a table. Therefore, a header row is generated.

    Also, since this row is empty, you need to refresh the collectionView of the FlexSheet instance to get the corresponding data. Please refer to the sample below:

    https://stackblitz.com/edit/angular-5hwjov

Need extra support?

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

Learn More

Forum Channels