This is a migrated thread and some comments may be shown as answers.

[Solved] Paging: NextPrevAndNumeric doesn't work correct

7 Answers 284 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 22 Jun 2009, 08:39 AM
Hello,

I have a problem wirh the paging-function:

If I use PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric the paging doesn't work correct:

When I click on page 6 , page 7 will be shown, when I click on page 7, page 9 will be shown.

Can someone help me?

Christian

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 22 Jun 2009, 10:25 AM
Hi Christian,

I followed your scenario in order to replicate the issue but to no avail. Please find attached a small runnable application which handles the desired functionality. Give it a try and let me know what is the difference in your case.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Christian
Top achievements
Rank 1
answered on 23 Jun 2009, 07:22 AM
Hi Pavlina,

your example works fine.

But we crreate our RadGrid dynamicly, here is some code:
                .EnableEmbeddedSkins = False 
                .MasterTableView.TableLayout = GridTableLayout.Fixed  
                .PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric  
                .PagerStyle.Visible = True 
                .PagerStyle.Position = GridPagerPosition.Bottom  
                .PagerStyle.ShowPagerText = True 
                .AllowPaging = True 
                .PageSize = 17 

Can you see any error?

Christian
0
Christian
Top achievements
Rank 1
answered on 23 Jun 2009, 08:14 AM
Example:

Change page:  1 2 3 4 5 6 7 8 9 10 ...    Displaying page 1 of 18, items 1 to 17 of 304. 

-  when I click on page 4, page 5 will be shown
- when I clik on "..." then page 11 will be shown (correct)
- when I then click on pagge 15, page 9 will be shown

etc.

When I look in the even PageIndexChanged, the current index (e.NewPageIndex) is parsed correct, when the page is undr 10.

 I find that when I have more than 10 pages and click on the "..." to go to the next set of pages the pager shows 11 - 20 but when I click on a page number the GridPageChangedEventArgs has the wrong NewPageIndex, instead of getting page number 15 when I click 15 I get page number 5.

At the moment I can't view any of the pages after the 10th page.

Are there perhaps some fault with some event or rebind ?

Thanks

Christian
0
Pavlina
Telerik team
answered on 23 Jun 2009, 03:55 PM
Hi Christian,

I went through your code and it looks fine to me.
At this point in order to find a quick solution/fix of this matter I will ask you to open a formal support ticket and send me a simple runnable application. Thus I could do all my best to help you in further in resolving this issue.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wei
Top achievements
Rank 2
answered on 05 Aug 2009, 08:31 PM

Hi Pavlina,

 

We use RadGrid in Telerik.Web.UI namespace. I put one in two pages. Both are set up in the same way that enable paging.  In each radgrid, we have about 500 rows of records, and the pagesize is 20. If the user hit some page, say page7, then change the pagesize to 500, one page works fine as it will automatically go to the page 1 and load all 500 records. But in another page it just stays in the Page 7, show no records and have sign “Displaying page 7 Of 1, Items 3001 to 0 Of 0.”

 

I search through your forum and sense it might be a bug with the control. Could you please let me know how to solve it?

 

Thanks and I look forward to your feedback.

 

Wei  

0
Pavlina
Telerik team
answered on 06 Aug 2009, 04:51 PM
Hi Wei,

From the information provided so far I am not able to determine the exact source of the issue you are facing. At this point I will ask you to open a formal support ticket and send us a simple working application(incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). Thus I could do all my best to help you further in resolving it.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wei
Top achievements
Rank 2
answered on 07 Aug 2009, 03:18 PM
Thansk Palvine, I sorted it out. It should use table.defaultview instead of table as the Radgrid's datasource to prevent paging error.
Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Christian
Top achievements
Rank 1
Wei
Top achievements
Rank 2
Share this question
or