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

CurrentPageIndex = 0 for custom paging if ViewState is turned off in the container

1 Answer 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stan
Top achievements
Rank 1
Stan asked on 05 Jul 2011, 09:22 PM
I have RadGrid inside of the user control which has ViewState turned off. Everything runs fine, including default paging. The problem is that I cannot make custom paging to work because if grid has AllowCustomPaging=true then CurrentPageIndex is always 0 since the container has view state disabled. The grid itself has EnableViewState="true" but it appears that it stores CurrentPageIndex elsewhere.

There is OnPageIndexChanged event which does fire and gives me the next page index, but I cannot use it to store index in the session because this event fires AFTER OnNeedDataSource. I wish there was OnPageIndexChanging event..

How can I make it to work?

-Stan

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 08 Jul 2011, 01:58 PM
Hi Stan,

I tried our online demo code for custom paging and disabled the ViewState. Even that way, the grid was working as expected.

See the attachment and let us know what is different on your side.

Greetings,
Tsvetina
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Stan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or