display limit rows on grid form

This question is not answered

Dear All,

I have create X++ query display in grid form, the query is working fine, but in some case it produces many records. It is possible to limit to top 10 records display? Can anyone suggest or provide code to limit displays to 10 rows. I have looked into both display method and displayOption method, but could not figure out how to code it.  Any suggestion is appreciated.

 

Thanks,

 

Tro.

All Replies
  • there is a way but i do not know if it's fine with you or not

    you can limit the limit view in the grid from grid proprieties right click on the grid and choose proprieties and then go to visiblerows and put 10 in this case   the grid will view only 10   .

    may be this helping

    My Technical Blog :

     

    My Linked In :

     

    Best Regards,

    Eng.Abdel Fatah Ahmed 
    Software Engineer 
    E-mail:programer.xxx@gmail.com
    Mobile UAE:+971557057898
    Mobile EGY:+201283891532

  • Thank you for your suggestions. I have tried this before, it doesn't work

    User can still scroll with the scroll bar. What really like to achieve is after query andd

    Sorted by qty then display to top 10 highest QTY records on Grid form.

    Thank again for your suggestion

    Regards,

    Tro

  • In AX2012 MS has added firstOnly10.

    add a statement on execute query of the form data source.

    select firstOnly10 from <DataSourceName> order by Qty;

  • this doesnt work Huzaifa.......

    I have the same requirement suppose i have  10 rows in  a grid and I have to display only 3 then how to do such activity

    Plz someone suggest.

    thank you.