Jump to content

UniDBGrid:How to split record pages ?


55143681

Recommended Posts

My table maybe have 50000(which>65536) records,

I want to show 50 records every page,

So I set UniDBGrid's pagesize=50,

and set  my UniQuery's fetchRows=50,

But ,I can see one page,no more pages.

How to show every page with 50 records one page  and use PagingBar to  turn to every page  ?

 

 

Link to comment
Share on other sites

2 hours ago, 55143681 said:

My table maybe have 50000(which>65536) records,

I want to show 50 records every page,

So I set UniDBGrid's pagesize=50,

and set  my UniQuery's fetchRows=50,

But ,I can see one page,no more pages.

How to show every page with 50 records one page  and use PagingBar to  turn to every page  ?

 

 

As your query returns only 50 rows, unigui will show the total 50. You should use only paging from unigui side.

Are there any problems about paging?

Link to comment
Share on other sites

10 hours ago, Hayri ASLAN said:

As your query returns only 50 rows, unigui will show the total 50. You should use only paging from unigui side.

Are there any problems about paging?

As you know :UniQuery's fetchRows max can be set to 65535,

If my table have more than 65535 records,

than,How can I turn pages to display the records behind 65535?

Link to comment
Share on other sites

On 6/22/2021 at 4:55 PM, Oliver Morsch said:

Try UniQuery.SpecificOptions.Values['FetchAll'] := 'True';

 

That means fetch all the records a time?

can the system hold all the records?

or All the records are paged,but only return one page records every time?

Link to comment
Share on other sites

On 6/21/2021 at 2:11 PM, 55143681 said:

I want to show 50 records every page,

try this

 

    UniDBGrid1.WebOptions.PageSize    := 50;
    TUniQuery(UniDBGrid1.DataSource.DataSet).FetchRows := 50;
    TUniQuery(grid.DataSource.DataSet).SpecificOptions.Values['FetchAll'] := 'False';
	TUniQuery(grid.DataSource.DataSet).SmartFetch.LiveBlock := True;
    TUniQuery(grid.DataSource.DataSet).SmartFetch.Enabled   := True;
    
	UniDBGrid1.Summary.Enabled        := True;
    UniDBGrid1.WebOptions.Paged       := True;
    UniDBGrid1.BufferedStore.Enabled  := False;

    // bug http://forums.unigui.com/index.php?/topic/17115-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-uncaught-typeerror-i-is-undefined-%D0%BF%D0%BE%D0%B4%D0%B2%D0%B8%D1%81%D0%B0%D0%B5%D1%82-%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5/
    grid.JSInterface.JSConfig('bufferedRenderer', [False]);

 

Link to comment
Share on other sites

On 7/1/2021 at 3:07 PM, x11 said:

try this

 


    UniDBGrid1.WebOptions.PageSize    := 50;
    TUniQuery(UniDBGrid1.DataSource.DataSet).FetchRows := 50;
    TUniQuery(grid.DataSource.DataSet).SpecificOptions.Values['FetchAll'] := 'False';
	TUniQuery(grid.DataSource.DataSet).SmartFetch.LiveBlock := True;
    TUniQuery(grid.DataSource.DataSet).SmartFetch.Enabled   := True;
    
	UniDBGrid1.Summary.Enabled        := True;
    UniDBGrid1.WebOptions.Paged       := True;
    UniDBGrid1.BufferedStore.Enabled  := False;

    // bug http://forums.unigui.com/index.php?/topic/17115-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-uncaught-typeerror-i-is-undefined-%D0%BF%D0%BE%D0%B4%D0%B2%D0%B8%D1%81%D0%B0%D0%B5%D1%82-%D0%BF%D1%80%D0%B8%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5/
    grid.JSInterface.JSConfig('bufferedRenderer', [False]);

 

Thanks a lot,Only the follow will work .

 

UniDBGrid自带自动分页功能,只需要对UniDBGrid和其关联的数据查询控件UniQuery做几个简单的属性设置即可,比如想让每页显示50条记录,设置如下:

1)  UniDBGrid设置:WebOptions.Paged=TrueWebOptions.PageSize=50

2)  UniQuery设置:FetchRows=50SmartFetch.Enabled=True

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...