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:
@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.
Hi, Farhodjon Abdukodirov
Can you please share a sample oml with that issue?
Best regards,
Bernardo Cardoso
Hi @Bernardo Cardoso I cannot share the oml due to companies privacy rule
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
Hi, I'm facing the same problem too. May i know how you solve this? Thanks in advance.
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.
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.
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.
@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.
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.