Change the page size in a grid

Hi all !

I search a way to change the number of rows that are display on a grid view when we acces to it. The default value is 40 but i want that all my grid view to be display on a single page.

Thanks,
Matthias

Hi Matthias and welcome!
I think there is some configuration for grid.

You can try this

<xsd:attribute name=“x-no-fetch” type=“xsd:boolean”>
xsd:annotation
xsd:documentationWhether to fetch initial records.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>

Thanks for your answer Fabio,

I don’t understand how “fetch initial records” could help me to set the number of row at 80 for example.
Can you explain how would you do please ?

Regards

Hi Matthias
I think you have to change JS
If you have a look of my attached image, you will see view.base.js there are 2 methods
setPageSize getPageSize

At the moment I don’t know which configuration to set page size for certain grids.

Hi Fabio,

I already tried to hardcode page.limit but it still do nothing… but i think like you that i have to change JS, if i found i’ll keep you informed

1 Like

page.limit was the right way

I added $scope._dataSource._page.limit=999999; in view.base.js and it work !

1 Like

Good idea! Nice work

1 Like

You can set page size with view-param from the action-view like this:

<action-view ...>
  ...
  <view-param name="limit" value="100" />
</action-view>
2 Likes

It’s way easier like that :laughing: