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

[Solved] Deleting last item in grid with 1 item on last page

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jmo
Top achievements
Rank 1
jmo asked on 17 Nov 2010, 12:28 PM
I couldn't find a thread on this.

If I have 1 item on the last page of my grid, deleting the item leads to a broken view of the Grid.

So if I have 7 items, with 1 item on the last page (ie. 3 items per page) and I click the delete button, the item gets deleted fine, but the rebind ends up causing the grid to show 2 pages, with the "No records to display" message, and the counter "Displaying items 7 - 6 of 6".

I am using Ajax binding.

This can be seen on the Telerik demo here :
- go to last page
- delete all but one, so you are left with "Displaying items 71 - 71 of 71"
- then delete the last one, you'll observe "Displaying items 71 - 70 of 70" and "no records to display"

I've tried to do some redirection after each Delete command, but RedirectToAction keeps giving me a JSON error. I've also tried Custom paging and resetting the returned data to page 1, but get worse errors with that.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 23 Nov 2010, 01:30 AM
Yes, same issue.

Any solution?
Tags
Grid
Asked by
jmo
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Share this question
or