Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Lost PageIndex when sorting with Custom DataBinding
posted

Hi guys,

I have a webdatagrid with following data settings:

- EnableDataViewState="true"

- EnableViewState="true"

- EnableAjax="false"

- Implement CustomDataBinding

- current page has a Master page

My paging function works well but i'm facing problem with sorting at event SortingEventArgs.

for instance: i'm staying in Page 2 and i click on a column to sort. Normally, after running PageLoad, the SortingEvent should be fired but after running the PageLoad of current page, it runs the PageLoad of Master page and the SortingEventArgs is fired finally. When debugging at SortingEventArgs event i saw the WebDataGrid PageIndex is reset to 0 (it means i lost PageIndex, it should be 2).

How can i correct it?

Thanks,

Nam Dang