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

[Solved] EditModeItem and PageSizeChange

1 Answer 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Virendra
Top achievements
Rank 1
Virendra asked on 30 Sep 2009, 12:05 PM
Hi,

When I change my grid's PageSize, the grid looses the track of edititem.
for example
I have a grid of pagesize 10, when i am on page 2 of my grid and changes 4th item to edit mode and after that i changes my pagesize to 20. Idealy it should display 20 items and make 14th item in edit mode but the gird load with 4th item in edit mode.

thanks
virendra

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 02 Oct 2009, 03:18 PM
Hi Virendra,

I am afraid that the described behavior is rather expected. Edited grid items are usually save only on Update button click. However, when you change the page size, current, sort, etc., the grid is implicitly rebound and displays only the data saved/available in data base.
In order to overcome this issue, you can try handling the PageSizeChanged event of RadGrid, check if there are edit items in your RadGrid and save there data respectively.

Find more about RadGrid lifecycle in the below online resources:
http://www.telerik.com/help/aspnet-ajax/grdeventsequence.html
http://www.telerik.com/help/aspnet-ajax/grdcommandsthatinvokerebindimplicitly.html

I hope this helps.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Virendra
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or