Hello.
I've implemented paging and it works great, however, when I use the scroll bar to change the page the scroll bar position always goes back to the second/third page position. Below is my OnCommand method that deals with changing the page.
I've implemented paging and it works great, however, when I use the scroll bar to change the page the scroll bar position always goes back to the second/third page position. Below is my OnCommand method that deals with changing the page.
args.set_cancel(true); |
var commandArg = args.get_commandArgument(); |
if(commandArg == 'Next') |
thisSession.Grid.Page += 1; |
else if(commandArg == 'Prev') |
thisSession.Grid.Page -= 1; |
if(thisSession.Grid.Page == 0) thisSession.Grid.Page = 1; |
thisSession.Grid.Page = sender.get_masterTableView().get_currentPageIndex() + 1; |
if(args.get_commandName() == "Sort") |
{ |
thisSession.Grid.SortExpression = sender.get_masterTableView().get_sortExpressions(); |
var tsContent = $find('<%=tsContent.ClientID %>'); |
if(!tsContent) return; |
} |
var tsContent = $find('<%=tsContent.ClientID %>'); |
if(!tsContent) return; |
var searchID = tsContent.get_selectedTab().get_value(); |
//getSearch(searchID); |
var searchText = (thisSession.Grid.SearchText == null) ? '' : thisSession.Grid.SearchText; |
PAB3.GetSearch(searchID.substring(4),thisSession.Grid.Days, |
thisSession.Grid.Page,thisSession.Grid.PageSize,thisSession.Grid.SortExpression, thisSession.Grid.SearchType,searchText, |
updateGrid_Paging,function(e){alert(e.get_message());}); |