Hi everyone
I have a data grid called ngram_grid.
The grid needs to use pagination, but this is not working - in the image below, the pagination is switched on and rows_per_page is set to 10 but no page-changing options are available.
This sems to be the case regardless of changes I make to the obvious settings.
When I print the rows_per_page value, it shows as the value I input in the IDE:
print(self.ngram_grid.rows_per_page)
answer: 5
But this does not reflect when the grid is populated. There is no pagination.
The data grid’s rows need to be populated directly from a list of dictionaries like the one below, which has a variable length each time:
[{'Keywords': 'mauritius', 'Volume': 253}, {'Keywords': 'in mauritius', 'Volume': 19}, {'Keywords': 'to mauritius', 'Volume': 16}, {'Keywords': 'hotels', 'Volume': 13}, {'Keywords': 'resort', 'Volume': 13}, {'Keywords': 'le', 'Volume': 12}, {'Keywords': 'port', 'Volume': 8}, {'Keywords': 'beach', 'Volume': 8}, {'Keywords': 'morne', 'Volume': 7}, {'Keywords': 'le morne', 'Volume': 7}, {'Keywords': 'hotels in', 'Volume': 7}, {'Keywords': 'louis', 'Volume': 6}, {'Keywords': 'holidays', 'Volume': 6}, {'Keywords': 'packages', 'Volume': 6}, {'Keywords': 'grand', 'Volume': 6}, {'Keywords': 'port louis', 'Volume': 6}, {'Keywords': 'resort mauritius', 'Volume': 6}, {'Keywords': 'rodrigues', 'Volume': 5}, {'Keywords': 'lux', 'Volume': 5}, {'Keywords': 'india', 'Volume': 5}]
Here’s a basic clone with the data grid at the bottom: Anvil | Login
Can anyone suggest what might be going wrong here?
Thanks,
Richard