[Data Grid Reactive] Hide Pagination bar in DataGrid Reactive if there is only one page
Forge component by OutSystems R&D

Like the title says, I was wondering if there is any way to hide in Datagrid Reactive the pagination if the number of rows doesn't exceed the RowsPerPage variable, since it is redundant.


Thank you,

Hi Takeru,

I think it would be an improvement on the forge component to do this, or at least offer it as an option, but you can quite easily do it yourself with some custom CSS, as follows :

1) make a local integer variable to hold the number of rows in a page

2) set this as the property for OptionalConfigs/RowsPerPage on the Grid Widget

3) add a boolean output to your data fetch action, and set it to true if count is less or equal to rowsperpage 

4) wrap your grid inside a container with a conditional style class if this boolean is true


5) add some css to your screen or module

Good luck,

Dorine

Hi Takeru Mazuelos,

Put it inside a container, create a boolean variable and put it in place of true as shown in the image.

You can also place an IF and do the same treatment using the variable.

Right-click, you can do it using these two options, as shown in the image:

I hope it helps you.

Best Regards.

the thing is that the pagination is part of a DataGrid Reactive module so I can't change it. Its just part of the grid :P

Thank you anyways!

Hi Takeru,

I think it would be an improvement on the forge component to do this, or at least offer it as an option, but you can quite easily do it yourself with some custom CSS, as follows :

1) make a local integer variable to hold the number of rows in a page

2) set this as the property for OptionalConfigs/RowsPerPage on the Grid Widget

3) add a boolean output to your data fetch action, and set it to true if count is less or equal to rowsperpage 

4) wrap your grid inside a container with a conditional style class if this boolean is true


5) add some css to your screen or module

Good luck,

Dorine

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