Search code examples
genexusgenexus-sd

Refresh a grid in Genexus Android


I have a Smart device (Android) project in genexus 17U10. I have panels with grids and I I need to place variables in the same panel and filter the grid values ​​according to the value of those variables.

To put it simply, let's say I have a checkbox outside the grid: if the checkbox is true, the grid shows all the records, if it's false it has to show only the filtered values.

In the panel I have this condition:

AttributeDate = 2022 when &checkBox = true;

but it isn't working. When I click the checkbox, the grid doesn't refresh. The only time the condition is checked is at grid creation (I've tested other conditions), but also if I try to forcibly call refresh or grid.refresh nothing happens. I tried to put the condition in panel's conditions or grid's conditions, nothing change.

What am I doing wrong?


Solution

  • Try adding the variable &checkBox in the Parm rule of the SDPanel.

    Parm(in:&checkbox);
    

    As the refresh event is a server-side event, the new value of the variable should not be reaching the data provider of the grid refresh.