﻿ $IG.Paging=function(obj,objProps,control,parentCollection){$IG.Paging.initializeBase(this,[obj,objProps,control,parentCollection]);this._pageIndex=this._get_clientOnlyValue("pi");this._pageCount=this._get_clientOnlyValue("pc");this._pageSize=this._get_clientOnlyValue("ps");this._pagerAppearance=this._get_clientOnlyValue("pa");this._elementTop=this._get_owner()._elements["pager_top"];this._elementBottom=this._get_owner()._elements["pager_bottom"];if(this._elementTop)this._grid._addElementEventHandler(this._elementTop,"click",Function.createDelegate(this,this._onPagerClick));if(this._elementBottom)this._grid._addElementEventHandler(this._elementBottom,"click",Function.createDelegate(this,this._onPagerClick));};$IG.Paging.prototype={get_pageIndex:function(){return this._pageIndex;},set_pageIndex:function(value){var raiseEvent=arguments[1];if(value==this.get_pageIndex())return;var oldPageIndex=this.get_pageIndex();var eventArgs=null;if(raiseEvent){eventArgs=new $IG.PagerEventArgs(this,value);this._owner._raiseSenderClientEventStart(this,this._clientEvents["PageIndexChanging"],eventArgs);}if(!eventArgs||!eventArgs.get_cancel()){this._pageIndex=eventArgs?eventArgs.get_newPageIndex():value;if(oldPageIndex!=this._pageIndex){this._owner._actionList.add_transaction(new $IG.GridAction("PageChange",this.get_name(),this,this._pageIndex,oldPageIndex));if(raiseEvent)this._owner._raiseClientEventEnd(eventArgs);else if(!this._grid._enableAjax)this._owner._postAction(1);else{eventArgs=new $IG.PagerEventArgs(this,value);eventArgs._props[1]=2;this._owner._postAction(eventArgs);}}}if(eventArgs)eventArgs.dispose();},_set_pageIndexInternal:function(value){this.set_pageIndex(value,true);},get_pageCount:function(){return this._pageCount;},get_pagerAppearance:function(){return this._pagerAppearance;},get_pageSize:function(){return this._pageSize;},_onPagerClick:function(evnt){var pageIndex=evnt.target.getAttribute("idx");if(typeof(pageIndex)!="undefined"&&pageIndex!=null){pageIndex=parseInt(pageIndex,10);this._set_pageIndexInternal(pageIndex);}},dispose:function(){if(this._elementTop)$clearHandlers(this._elementTop);if(this._elementBottom)$clearHandlers(this._elementBottom);$IG.Paging.callBaseMethod(this,"dispose");this._elementTop=null;this._elementBottom=null;},_initializeComplete:function(){var isPageIndexChanged=this._get_clientOnlyValue("pic");if(this._clientEvents["PageIndexChanged"]&&isPageIndexChanged){this.__raiseClientEvent('PageIndexChanged');}}};$IG.Paging.registerClass('Infragistics.Web.UI.Paging',$IG.GridBehavior);$IG.PagerEventArgs=function(pager,newPageIndex){$IG.PagerEventArgs.initializeBase(this,[pager]);this._props[2]=newPageIndex;};$IG.PagerEventArgs.prototype={get_newPageIndex:function(){return this._props[2];},set_newPageIndex:function(value){this._props[2]=value;}};$IG.PagerEventArgs.registerClass('Infragistics.Web.UI.PagerEventArgs',$IG.CancelBehaviorEventArgs); 
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();