FlexGrid Select an item right after reloading

Posted by: lk_richard on 4 May 2020, 11:46 pm EST

    • Post Options:
    • Link

    Posted 4 May 2020, 11:46 pm EST

    Hi team,

    Just a quick question about how to select an item right after itemsource updated.

    I tried to put on a line to locate the new updated row after reloading the binding itemsource. But it does not work.

    this.flex.collectionView.currentItem = this.instanceNodes.find(x => x.id == this.updatedId);

    If I put this line in a button click, it works fine.

    Thanks.

  • Posted 5 May 2020, 2:58 am EST

    Hi Richard,

    You can use the itemsSourceChanged event of the FlexGrid and in the event handler, you may set the currentItem as per your requirement. Please refer to the sample link below for reference:

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

    Regards,

    Ashwin

  • Posted 5 May 2020, 5:24 am EST

    Thanks so much, ashwin. This resolves my problem.

Need extra support?

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

Learn More

Forum Channels