How to maintain the expanded details view state up on refreshing collection

Posted by: anilkumarpotluri on 14 September 2017, 11:31 am EST

  • Posted 14 September 2017, 11:31 am EST

    I loaded wijmo grid with 10 records initially and each record contains the details view and detailvisibilitymode set to “ExpandMulti”. As a user I can expand few rows to see details view. Until this point I don’t have any problem.

    Then after I able to scroll down and able to update the wijmo collection with new paged data using infinite scroll. When I update source collection I was not able maintain the state of the details view of previously expanded records.

    Is there any way I can maintain the state of the expanded records with out manual interaction upon refresh.

  • Posted 14 September 2017, 11:31 am EST

    Hello,

    Since you are updating the source collection of FlexGrid and loading the data when the user scrolls down, so the grid is refreshed to display the new data and would have only the data which is currently available in the display of FlexGrid, so it would not maintain the expand state of the detail rows.

    You would need to manually save the expand state of the detail rows and apply the expand state again when the user scrolls to load the previously expanded rows. It would not be possible to maintain the expand state without manual interaction upon refresh.

    Hope it helps.

    Thanks,

    Manpreet Kaur

  • Posted 14 September 2017, 11:31 am EST

    Hello,

    Thanks for the quick update.

    Do you mean that we need to call “showDetail” event on every row which we need to expand.

    I may get into one more problem if I do that

    1. I have expanded only first row.
    2. Up on scrolling I have refreshed the grid with 50 more records.
    3. After loading If I fire “showDetail()” on expanded row scroll bar moving to top/ row which I was expanded, but it’s not able to stay at the same position it was before.

    If you don’t mind can I have script which will expand the required rows and at the same time maintain the scroll position it was before.

    If not may I know which event I should use to put my code to expand records with out disturbing user current view.

  • Posted 14 September 2017, 11:31 am EST

    Hello,

    I am working on creating a sample application which mests your requirement. I would need some time to look into the issue further at my end. I would soon share my observations on the same.

    Thanks,

    Manpreet Kaur

  • Posted 14 September 2017, 11:31 am EST

    That would be helpful to us. Thanks Manpreet Kaur.

  • Posted 14 September 2017, 11:31 am EST

    Hello,

    I apologize for the delayed response. We tried creating the sample at our end, however we faced several issues. We have escalated the issue to the development team for further discussion. We will let you know as soon as I get any information in this regard.

    Thanks,

    Manpreet Kaur

  • Posted 14 September 2017, 11:31 am EST

    Hello,

    Do we have any solution to this?

    Thanks.

    Anil Kumar Potluri.

  • Posted 13 March 2019, 11:45 am EST

    Any update on this issue. I have also same problem for every time if I do any action on rows, the all rows are going to collapsed. Please provide any code regarding this.

  • Posted 13 February 2021, 5:10 pm EST

    Was there ever a solution provided for this? DetailRow seems a reasonably limited feature if this can’t be solved.

  • Posted 16 February 2021, 1:10 am EST

    Hi Tim,

    There is a solution for this. You can handle the updatedView event of the FlexGrid and save the rows whose details are displayed and in the loadedRows event, display the details of each of these rows again. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/typescript-yryx7o

    This issue occurs because whenever you update the data of the grid, sort/filter the grid or perform some other operation that changes the CollectionView of the grid, the internal data is updated and the rows of the grid are re-created which causes their detail rows to be removed.

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels