Hidden next and previous button on Data grid after mx 10

0
Hi,   I want to show the next and previous button on data grid, earlier in 9.21 it is visible now in mx 10.12 we have requirement to show the buttons.  I am attaching image for your reference.   
asked
3 answers
0

Hi Chetu,

Your concern is valid. You can simply do the following:

  • Replace the old Data Grid with DataGrid 2

  • In DataGrid 2 properties:

    • Enable Paging

    • Set the Page size

    • Set Navigation bar position to Bottom (or Top & Bottom)

This will display the Next / Previous navigation buttons.

answered
0

If you don’t want to switch to Data Grid 2 (which I would also recommend in your case), you can implement pagination manually. Place a small layout container below the Data Grid and add your own Previous and Next buttons. Change the Data Grid data source to a microflow and control paging with a PageIndex variable. In the microflow, calculate the range using offset = PageIndex * 20 and limit = 20 (or any page size you prefer). On the Next button, increment PageIndex; on the Previous button, decrement it (with a minimum of 0), and refresh the data so the grid reloads the correct page. You can also display the current page index next to the buttons so users can clearly see which page they are on.

answered
0

Hello Chetu,

 

Your Issue looks similar to the one explained here

I also faced the same issue when I upgraded to Mendix 10 and this solution worked for me.

 

The steps described in that feed will probably help you solve the issue as well.

 

Hope this helps!

answered