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

RadGrid Pager not changing after delete

2 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
spt3210
Top achievements
Rank 1
spt3210 asked on 23 Jun 2010, 06:34 PM

After deleting items from grid, paging doesn't get refreshed.
After deleting all items from last page grid disappears as Pager Index doesn't get updated to previous page.

I tried updating PagingIndex manually but it didnt work.

Found a similar thread open on this issue...Is it a bug with telerik?

http://www.telerik.com/community/forums/aspnet-ajax/docking/radgrid-pager-does-not-getting-refreshed-on-item-deletion.aspx

2 Answers, 1 is accepted

Sort by
0
Accepted
Veli
Telerik team
answered on 24 Jun 2010, 02:36 PM
Hi spt3210,

Seems to work OK with the latest official release (2010.Q2.519) which you also indicate to be using. Attaching a test page for you to try out. Go to page 3 and delete the 2 items. After the last item, the grid should navigate to page 2.

Best wishes,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
spt3210
Top achievements
Rank 1
answered on 24 Jun 2010, 02:49 PM

Yes I am using the same version, but it didn't seem to work for me.

I didn't try the code you posted yet, but I was able to make it work by adding code below:

if (e.Item.OwnerTableView.PageCount - 1 >= pageIndex) 
      e.Item.OwnerTableView.CurrentPageIndex = pageIndex
else 
      e.Item.OwnerTableView.CurrentPageIndex = pageIndex - 1; 

Thanks.
Tags
Grid
Asked by
spt3210
Top achievements
Rank 1
Answers by
Veli
Telerik team
spt3210
Top achievements
Rank 1
Share this question
or