Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Keep line selection on...
Finance forum
Answered

Keep line selection on grid after update

Posted on by 379
Hi all,

I have created a form with 2 grids.

Each grid is feeded by it own datasource.

When i select a line on the first grid1, the second Grid2 is filtered based on grid1 line value.

Then on the second grid i'm using a checkbox control, i linked it to a modified method.

When modified method is used, the selected line from grid1 will be updated.

What i need now it's to keep highlighted the first selected line on Grid1, how to reach that ?

Thanksfully.
  • Awaxx Profile Picture
    Awaxx 379 on at
    Keep line selection on grid after update
    I tried before your answer this way but if i add in this modified method this code i will avoid the selection of the line i did and the selection will go up to the first line.
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 5,208 Super User 2024 Season 2 on at
    Keep line selection on grid after update
    Hi,
     
    Try to add this line also:
     
    YourParentTable_DS.research(true);
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
  • Awaxx Profile Picture
    Awaxx 379 on at
    Keep line selection on grid after update
    Hi,

    When i achieve the first part i describe on the initial post, i need to go back to the caller form. There i'm using the same table as datasource i ve got updated before. What i need now is to refresh the displayed data.

    Thanks
  • Waed Ayyad Profile Picture
    Waed Ayyad 5,208 Super User 2024 Season 2 on at
    Keep line selection on grid after update
    Hi,
     
    I'm glad your question is resolved, for your next question, what is the parent form? do you mean you have for example list page (caller form)? What do you want to achieve on the caller form? I need more details in order to help you.
     
    Thanks,
    Waed Ayyad
     
     
     
  • Awaxx Profile Picture
    Awaxx 379 on at
    Keep line selection on grid after update
    Thank you it's working.

    If i have to refresh the parent (callerform) form should i write it here too or where else ?!!!!!!

    Thanks.
  • Verified answer
    Waed Ayyad Profile Picture
    Waed Ayyad 5,208 Super User 2024 Season 2 on at
    Keep line selection on grid after update
    Hi,
     
    Do you mean that the selected line return to first record on the Grid1? if yes then try to call reread(), rereadreferencedatasource(), research(true), on your grid2 data source:
    YourTable_DS.reread();
    YourTable_DS.rereadReferenceDataSources();
    YourTable_DS.research(true);
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Awaxx Profile Picture
    Awaxx 379 on at
    Keep line selection on grid after update
    Hello, 

    Someone for some help please ?

     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans