Jump to content

uniDBGrid and navigation buttons in the bottom


mivi71dk

Recommended Posts

Hi

 

First of all - I'm sorry if this question has already been asked. If so - point me in the right direction (I have searched the forum, but maybe not good enough).

We have just started to use uniGUI. 

We use Delphi 11, uniGUI 1.90.0.1557 and FireDAC.

 

I have a frame, where I have put a uniDBGrid on. 

The query attached via datasource here selects almost 10.000 rows and 15 columns. 

Under WEBOptions it is set to:

  • Paged=TRUE
  • PageSize=100
  • FetchAll = FALSE

When the frame is showned and the query opened, it will as expected show 100 rows.

https://ibb.co/gr2Pdmm

 

At the button of the DBGrid there is a First page, previous page, Current page, next page, last page and a refresh.

All buttons are disabled, and I am on page 1. Eventhough there should be almost 100 pages.

I can scrool up and down on those 100 records being showned. I cant get to next page.

 

I can enable FetchAll=TRUE and then I have a correct number and all buttons are open. But this is not what I want. 

We might have customer with millions of records, and I cant have them fetchAll. 

 

Another solution is to enter a value in a uniComboBox and do a locate on this value. 

Then the entered value is located, and suddenly buttons are enabled and it says 98 pages.

https://ibb.co/TbvQKb1

 

I would like the buttons to be enabled, but without fetching all.

 

 

Link to comment
Share on other sites

Michael,

I am new to this too, I have a similar setup and believe I have it working the way you want.  In my WebOptions I have
FetchAll = False
Paged = True
PageSize = 100

Hope this is your answer and not my blind luck

-Allen

Link to comment
Share on other sites

15 minutes ago, Allen said:

Michael,

I am new to this too, I have a similar setup and believe I have it working the way you want.  In my WebOptions I have
FetchAll = False
Paged = True
PageSize = 100

Hope this is your answer and not my blind luck

-Allen

This is how I have it set, but it does not show more than the first page. And I cant get it to go to all the next pages, unless I do a locate first...

Link to comment
Share on other sites

I suggest creating filter mechanisms so that your user really looks for what is needed, throwing a huge mass of data in a grid doesn't make much sense, your user will be scrolling the grid for hours looking for the desired information.

still, try to use Grid's BufferedStore option

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...