ASPxClientDataView = _aspxCreateClass(ASPxClientControl, { constructor: function(name) { this.constructor.prototype.constructor.call(this, name); this.allowMultipleCallbacks = false; this.callbackPrefixes = { Custom: "c", PagerClick: "p" }; this.sizingConfig.allowSetHeight = false; }, GetMainElement: function() { if(__aspxIE && __aspxBrowserMajorVersion < 8) { if(!_aspxIsExistsElement(this.mainElement)) { var name = this.name; var predicate = function(e) { return e.id == name && e.tagName == 'TABLE' }; this.mainElement = _aspxGetDescendantNodes(document.body, predicate)[0]; } return this.mainElement; } return ASPxClientControl.prototype.GetMainElement.call(this); }, GetPageIndexInputElement: function(){ return _aspxGetElementById(this.name + "_S"); }, GetContentCell: function(){ return this.GetChild("_CCell"); }, GetItemsCell: function(){ return this.GetChild("_ICell"); }, DoPagerClick: function(value) { var inputElement = this.GetPageIndexInputElement(); if(inputElement != null) { var pageIndex = inputElement.value.split(";")[0]; var preparedArgs = this.PrepareCallbackArgs(pageIndex + __aspxCallbackSeparator + value, false); this.CreateCallback(preparedArgs, "PAGERCLICK"); } }, CustomCallback: function(args) { var preparedArgs = this.PrepareCallbackArgs(args, true); if(!this.callBack) { if(this.isInitialized) this.SendPostBack(preparedArgs); return; } this.CreateCallback(preparedArgs, "CUSTOMCALLBACK"); }, OnCallback: function(result) { var inputElement = this.GetPageIndexInputElement(); if(inputElement != null) inputElement.value = result.index + ";" + result.count; var element = this.GetContentCell(); if(element != null) _aspxSetInnerHtml(element, result.html); }, CreateCallback: function(arg, command, callbackInfo) { this.ShowLoadingPanel(); ASPxClientControl.prototype.CreateCallback.call(this, arg, command); }, PrepareCallbackArgs: function(args, isCustomCallback){ return (isCustomCallback ? this.callbackPrefixes.Custom : this.callbackPrefixes.PagerClick) + args; }, ShowLoadingPanel: function(){ this.CreateLoadingPanelWithAbsolutePosition(this.GetContentCell()); }, PerformCallback: function(parameter) { this.CustomCallback(parameter); } }); ASPxClientDataView.Cast = ASPxClientControl.Cast; function aspxDVPagerClick(name, value) { var dv = aspxGetControlCollection().Get(name); if(dv != null) dv.DoPagerClick(value); }