but how can i go the next page of data grid?

Posts   
 
    
Bedouin
User
Posts: 15
Joined: 14-Jun-2005
# Posted on: 21-Jul-2005 10:31:42   

it is working , thank you otis. but Data grid shows only first page how can i go take second or another page? this.DataGridAmbarFisi.CurrentPageIndex = e.NewPageIndex; but I can not see the other pages

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Jul-2005 10:47:16   

Please don't start a new thread, just reply in the older thread next time simple_smile .

You've to show the user a list of pages, like google does for example. Then the user can click on a page number, for example '4', and you then fetch page 4, by passing in '4' for the page number and for example 50 for the page size and re-bind that collection to the grid.

Frans Bouma | Lead developer LLBLGen Pro
Bedouin
User
Posts: 15
Joined: 14-Jun-2005
# Posted on: 21-Jul-2005 12:43:20   

int amount = stok.GetDbCount(filter); amount = (amount/20)+1; StokFisiHareketleriObj.GetMulti(filter,0,sort,null,i,20);

it returns 20 rows for the grid it is ok. but how can i give the all page number to the grid. i find the page numbers (amount).how can i assisgn that value? it only shows 1 st page of the data grid. isn't data grid take page number to returing result set of collection?

thank you

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Jul-2005 17:24:57   

You have to display the pages separate from the grid, as the grid most likely doesn't offer you a feature to display pages. Then when the user selects a page, you simply refetch the data, for that page, and bind the collection again to the grid. First clear the collection, before you fetch the new page.

Frans Bouma | Lead developer LLBLGen Pro