65
Views
10
Comments
Solved
[OutSystems Data Grid] Duplicated context menu items showing when loading new data
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

I have two block parent and child when parent block has a button to show a child block. Child block open and loads data with filters passed by parent block. Data grid is shown everything looks good but after I click again with new params to child block Data grid show dublicated Context menu items. 

Parent block:

Child block: 

2022-06-13 15-40-01
Farhodjon Abdukodirov
Solution

@Catherine gan I was able to solve the problem using below JS before fetching data on every view result action:

OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId)._features.contextMenu._rootMenuItems=[];

Moreover, I can conclude that this issue is occurring when we dynamically change the Grid data (JSON string) with different columns on the same screen it worked on different screens for each table but not in one Grid.

2022-01-13 11-39-41
Bernardo Cardoso
Staff

Hi, Farhodjon Abdukodirov


Can you please share a sample oml with that issue?


Best regards,

Bernardo Cardoso

2022-06-13 15-40-01
Farhodjon Abdukodirov

Hi @Bernardo Cardoso I cannot share the oml due to companies privacy rule 

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Farhodjon Abdukodirov 

We don't need the original oml but a simpler one with the issue and the steps to reproduce, so no privacy issues on this if you use sample data.

Cheers,
GM

UserImage.jpg
Catherine gan

Hi, I'm facing the same problem too. May i know how you solve this? Thanks in advance.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Catherine gan 

Since Farhodjon Abdukodirov never ended up sharing the use case on a sample, can you please do that on an oml where we can reproduce that use case and with your steps to reproduce it? That way we can try to help and, if that's the situation, fix something on the product.

Cheers,
GM

UserImage.jpg
Catherine gan

Good day Sir,

i cannot really share the .oml file but i can share the screenshot with you.

i guess maybe cause by the advances sql list, as i need to run two different sql query.
but if i do it in aggregate and output the data in list, it wont be duplicate in context menu.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Catherine gan 

Sorry, but that isn't enough to be able to reproduce. 
We don't need the original oml but a simpler one with the issue and the steps to reproduce.

Cheers,
GM

2022-06-13 15-40-01
Farhodjon Abdukodirov
Solution

@Catherine gan I was able to solve the problem using below JS before fetching data on every view result action:

OutSystems.GridAPI.GridManager.GetGridById($parameters.GridId)._features.contextMenu._rootMenuItems=[];

Moreover, I can conclude that this issue is occurring when we dynamically change the Grid data (JSON string) with different columns on the same screen it worked on different screens for each table but not in one Grid.

UserImage.jpg
Catherine gan

@Farhodjon Abdukodirov

i tried your JS query, but end up the context menu box not showing up after right-click.


i try solve it by asking ChatGPT and it finally work.


and thank you everyone for help me on this. Have a good day.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Catherine gan / @Farhodjon Abdukodirov 

Could you please share the steps to reproduce and a sample oml so that we can try to reproduce and fix it directly on the product without the need for custom code?
This would be really useful to help the community using OS Data Grid.

Cheers,
GM

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