198
Views
4
Comments
Solved
[OutSystems Data Grid] Keep filters through user's session
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hi,

I would like to keep the filter's values through the user's session.


Thanks!

Regards,

Amelia

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi Amelia,

to extend on Marcio's answer, you will use GetViewLayout whenever the user is leaving the screen/block (i.e. in an OnDestroy handler) and save that value in a client variable.

And then whenever the user comes back to the screen, use the SetViewLayout with that saved client variable.

That would be maybe in the onAfterFetch of the data fetch for your grid, or maybe even a bit later, as the grid isn't rendered with the data yet at that point, I think.

Dorine

2021-06-02 20-50-04
Márcio Carvalho

Is it something like this? or can it be something like this? Or is not even close?

https://www.outsystems.com/forums/discussion/71225/data-grid-reactive-setviewlayout-onfilterchangevent/

Marcio

2021-06-02 20-50-04
Márcio Carvalho

Hello Amelia Salgado, I don't know if this is the case for data grid reactive, but with client actions, I think you can keep the filters when using the data grid.

Have a look at this post with the "same question"

https://www.outsystems.com/forums/discussion/74943/how-to-pass-an-object-to-another-screen/

I hope this helps you!

Kind regards,

Márcio

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi Amelia,

to extend on Marcio's answer, you will use GetViewLayout whenever the user is leaving the screen/block (i.e. in an OnDestroy handler) and save that value in a client variable.

And then whenever the user comes back to the screen, use the SetViewLayout with that saved client variable.

That would be maybe in the onAfterFetch of the data fetch for your grid, or maybe even a bit later, as the grid isn't rendered with the data yet at that point, I think.

Dorine

2021-06-02 20-50-04
Márcio Carvalho

Is it something like this? or can it be something like this? Or is not even close?

https://www.outsystems.com/forums/discussion/71225/data-grid-reactive-setviewlayout-onfilterchangevent/

Marcio

UserImage.jpg
Amelia Salgado

Thanks everyone for your quick support! Dorine's answer was straight to the point. I ended up using onReady and it works perfectly.

Regards,

Amelia

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.