Multirow inside a loop

Posted by: maricar.m.clariza on 16 January 2022, 11:23 am EST

  • Posted 16 January 2022, 11:23 am EST - Updated 3 October 2022, 3:07 am EST

    Hi,

    I am sort of new in wijmo…I need help on populating data in a div section using Collectionview

    in my ts file

  • Posted 17 January 2022, 12:09 am EST

    Hello,

    As per the above-shared image, this.cmData variable contains the collectionView therefore if you wish to iterate over the collectionView items then you may iterate over the collectionView’s sourceCollection property array holding the data items.

    Please refer to the sample link below for reference, in the sample below the data isn’t hierarchal so I created a list to show, if you have hierarchal structured data then you may do as per your requirement:

    https://stackblitz.com/edit/angular-pgvntt?file=src%2Fapp%2Fapp.component.html

    Regards

  • Posted 17 January 2022, 11:53 pm EST

    hmm as per checking on the sample code… you’ve used items = ; how to refresh multirow once I try to push an object on an array? I’ve tried using the grid.invalidate() and .refresh() but it didnt work

  • Posted 18 January 2022, 1:26 pm EST

    is there a way that I force refresh a multirow? itemsource?

  • Posted 18 January 2022, 8:51 pm EST

    Hello,

    You may try to refresh the collectionView in order to update the grid data collection. Please refer to the code snippet for reference:

    
    multiRow.collectionView.refresh();
    
    

    However, I’m not sure how you are adding the data here, it would be helpful if you could provide some more detailed information or a sample to replicate the issue.

    Regards

  • Posted 18 January 2022, 9:50 pm EST

    hi sonu … i have tried that code but its still wasnt working

  • Posted 18 January 2022, 9:56 pm EST

    im getting core.js:5980 ERROR TypeError: Cannot read properties of undefined (reading ‘collectionView’)

  • Posted 20 January 2022, 12:10 am EST

    Hello,

    We apologize but still, we are unable to replicate the issue at our end, please provide a sample replicating the issue or modify the above sample for the same. So that we can investigate the root cause of the issue and assist you accordingly.

    I’m afraid that without a sample, we would not be able to comment on the nature of the issue by looking at the shared error.

    Regards

  • Posted 23 January 2022, 12:51 pm EST - Updated 3 October 2022, 3:07 am EST

    1. here how I declare the itemsource value that i used… it has type any=



    2. screenshot is the part of my code in .ts where i pushed another object in an array.



    3. at line 8 parent element where I put a multirow as a child element

    everytime i trigger add new record… it pushes new object ( on my dimensional array) however the multirow data is not updating :frowning:

    1. screenshot 4 is how it looks like when the add button has been triggered. on the header part it show the count of records (it’s updating). However, as for the multirow data. It is not :frowning:
  • Posted 26 January 2022, 6:24 pm EST

    Hello,

    As per the observation based on the shared images, you may update the code shown in image 2 from item.measures.push(item) to item.measures = […item.measures, item]. This should fix the issue.

    Regards

Need extra support?

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

Learn More

Forum Channels