Болтун
Зарегистрирован: 21 July 2006
Сообщения: 429
Примеры кода: 0
|
Re: DevExpress.Web.ASPxGridView и javascript |
23 April 2008 17:53 |
|
|
| Оценка 2.00. |
|
Andrew Telnov
Спасибо Max Pro за мнение о продукте.
Уважаемы Max Pro.
Вы уверены что говорите про ASPxGridView?
Thank you,
Andrew Telnov,
DevExpress, R&D.
Пожалуйста. Это не только моё мнение.
Уверен, именно о нём, родимом.
Так как в более менее сложных применениях грид работает через пень колоду, приходится делать патчи, и скажу я вам, во многих случаях только Яваскрипт и спасает. Ты говоришь, Яваскрипта там мало ? А это ты видел?
=1=
constructor=function () {
if (ret.preparing) {
return delete ret.preparing;
}
if (ret.constr) {
this.constructor = ret;
ret.constr.apply(this, arguments);
}
}
=2=
name=masterGrid
=3=
uniqueID=masterGrid
=4=
autoPostBack=false
=5=
callBack=function (arg) {
WebForm_DoCallback("masterGrid", arg, aspxCallback, "masterGrid", aspxCallbackError, true);
}
=6=
allowMultipleCallbacks=true
=7=
requestCount=0
=8=
isInitialized=false
=9=
leadingAfterInitCall=false
=10=
sizeCorrectedOnce=false
=11=
serverEvents=
=12=
mainElement=null
=13=
Init=[object Object]
=14=
BeginCallback=[object Object]
=15=
EndCallback=[object Object]
=16=
custwindowLeft=null
=17=
custwindowTop=null
=18=
custwindowVisible=null
=19=
activeElement=null
=20=
filterKeyPressInputValue=
=21=
userChangedSelection=false
=22=
lockFilter=false
=23=
confirmDelete=
=24=
filterKeyPressTimerId=-1
=25=
savedScrollPosition=0
=26=
loadingPanelElement=null
=27=
loadingDivElement=null
=28=
SelectionChanged=[object Object]
=29=
FocusedRowChanged=[object Object]
=30=
ColumnSorting=[object Object]
=31=
ColumnGrouping=[object Object]
=32=
ColumnStartDragging=[object Object]
=33=
ColumnResizing=[object Object]
=34=
RowExpanding=[object Object]
=35=
RowCollapsing=[object Object]
=36=
RowClick=[object Object]
=37=
RowDblClick=[object Object]
=38=
ContextMenu=[object Object]
=39=
CustomizationWindowCloseUp=[object Object]
=40=
funcCallbacks=
=41=
pageRowCount=30
=42=
allowFocusedRow=true
=43=
focusedRowIndex=0
=44=
selectedWithoutPageRowCount=0
=45=
visibleStartIndex=0
=46=
columns=[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
=47=
isColumnsResizable=true
=48=
isMainControlResizable=true
=49=
callbackOnFocusedRowChanged=false
=50=
callbackOnSelectionChanged=false
=51=
autoFilterDelay=1200
=52=
cookieName=ReestrsFalseFalse
=53=
CreateColumn=function (name, index, fieldName) {
if (!_aspxIsExists(this.columns)) {
this.columns = new Array;
}
this.columns.push(new ASPxClientGridViewColumn(name, index, fieldName));
}
=54=
_constDXDataRow=function () {
return "DXDataRow";
}
=55=
_constDXGroupRow=function () {
return "DXGroupRow";
}
=56=
_constDXCustWindow=function () {
return "_DXTDcustwindow";
}
=57=
_constDXEmptyHeader=function () {
return "_DXTDemptyheader";
}
=58=
_constDXDropTarget=function () {
return "_DXT";
}
=59=
_constDXDropSource=function () {
return "_DXTD";
}
=60=
_constDXCanGroup=function () {
return "_DXTDG";
}
=61=
_constDXMainTable=function () {
return "DXMainTable";
}
=62=
_isGroupRow=function (row) {
return row.id.indexOf(this._constDXGroupRow()) > -1;
}
=63=
GetRootTable=function () {
return _aspxGetElementById(this.name);
}
=64=
GetGridTD=function () {
var table = this.GetRootTable();
if (!_aspxIsExists(table)) {
return null;
}
return table.rows[0].cells[0];
}
=65=
GetArrowDragDownImage=function () {
return this.GetChildElementById("IADD");
}
=66=
GetArrowDragUpImage=function () {
return this.GetChildElementById("IADU");
}
=67=
GetArrowDragFieldImage=function () {
return this.GetChildElementById("IDHF");
}
=68=
GetCallbackState=function () {
return this.GetChildElementById("CallbackState");
}
=69=
GetSelectionInput=function () {
return this.GetChildElementById("DXSelInput");
}
=70=
GetFocusedRowInput=function () {
return this.GetChildElementById("DXFocusedRowInput");
}
=71=
GetColResizedInput=function () {
return this.GetChildElementById("DXColResizedInput");
}
=72=
GetLoadingPanelDiv=function () {
return this.GetChildElementById("LPD");
}
=73=
GetRow=function (visibleIndex) {
var res = this.GetDataRow(visibleIndex);
if (res == null) {
res = this.GetGroupRow(visibleIndex);
}
return res;
}
=74=
GetDataRow=function (visibleIndex) {
return this.GetChildElementById(this._constDXDataRow() + visibleIndex);
}
=75=
GetGroupRow=function (visibleIndex) {
return this.GetChildElementById(this._constDXGroupRow() + visibleIndex);
}
=76=
GetDataRowSelBtn=function (index) {
return this.GetChildElementById("DXSelBtn" + index);
}
=77=
GetMainTable=function () {
return this.GetChildElementById(this._constDXMainTable());
}
=78=
GetScrollDiv=function () {
return this.GetChildElementById("DXScrollDiv");
}
=79=
GetStyleTable=function () {
return this.GetChildElementById("DXStyleTable");
}
=80=
GetLoadingPanelContainer=function () {
return this.GetChildElementById("DXLPContainer");
}
=81=
IsGroupHeader=function (id) {
return id.indexOf("_DXTDgroup") > 0;
}
=82=
GetHeadersRow=function () {
var row = this.GetChildElementById("DXHeadersRow");
return row != null ? row : this.GetScrollableRow();
}
=83=
GetScrollableRow=function () {
return this.GetChildElementById("DXHeadersRowScroll");
}
=84=
GetEditingRow=function (obj) {
return _aspxGetElementById(obj.name + "_DXEditingRow");
}
=85=
GetEditingErrorRow=function (obj) {
return _aspxGetElementById(obj.name + "_DXEditingErrorRow");
}
=86=
GetCustomizationWindow=function () {
return aspxGetControlCollection().Get(this.name + this._constDXCustWindow());
}
=87=
GetParentRowsWindow=function () {
return aspxGetControlCollection().Get(this.name + "_DXparentrowswindow");
}
=88=
GetEditorPrefix=function () {
return "DXEditor";
}
=89=
GetPopupEditForm=function () {
return aspxGetControlCollection().Get(this.name + "_DXPEForm");
}
=90=
GetEditorByColumnIndex=function (colIndex) {
var list = this._getEditors();
for (var i = 0; i < list.length; i++) {
if (this._getNumberFromEndOfString(list[i].name) == colIndex) {
return list[i];
}
}
return null;
}
=91=
Initialize=function () {
this.constructor.prototype.Initialize.call(this);
this.correctTableBodyHeight();
this.SetHeadersClientEvents();
if (_aspxIsExists(this.callBacksOnInit)) {
for (var i = 0; i < this.callBacksOnInit.length; i++) {
this.callBack(this.callBacksOnInit[i]);
}
this.callBacksOnInit = null;
}
this.correctScrollableRow();
}
=92=
GetChildElementById=function (childName) {
if (!_aspxIsExists(this.childrenCache)) {
this.childrenCache = new Object;
}
if (!_aspxIsExistsElement(this.childrenCache[childName])) {
this.childrenCache[childName] = _aspxGetElementById(this.name + "_" + childName);
}
return this.childrenCache[childName];
}
=93=
gridCallBack=function (args) {
if (!_aspxIsExists(this.callBack) || !this.isInitialized) {
if (this.isInitialized) {
this.SendPostBack(args);
}
return;
}
var rootTD = this.GetGridTD();
this.OnBeforeCallback();
var command = this.GetCorrectCommand(args);
args = this.prepareCallbackArgs(args, rootTD);
this.lockFilter = true;
this.userChangedSelection = false;
this.CreateCallback(args, command);
}
=94=
GetCorrectCommand=function (args) {
if (typeof args != "string" || args.indexOf("|") < 0) {
return "";
}
var command = args.substr(0, args.indexOf("|"));
if (command == "COLUMNMOVE") {
var list = args.split("|");
if (list[list.length - 1] == "true") {
command = "UNGROUP";
}
if (list[list.length - 2] == "true") {
command = "GROUP";
}
}
return command;
}
=95=
FuncGetCallBackIndex=function (onCallBack) {
for (var i = 0; i < this.funcCallbacks.length; i++) {
if (this.funcCallbacks[i] == null) {
this.funcCallbacks[i] = onCallBack;
return i;
}
}
this.funcCallbacks.push(onCallBack);
return this.funcCallbacks.length - 1;
}
=96=
GetFuncCallBack=function (index) {
if (index < 0 || index >= this.funcCallbacks.length) {
return null;
}
var result = this.funcCallbacks[index];
this.funcCallbacks[index] = null;
return result;
}
=97=
gridFuncCallBack=function (args, onCallBack) {
args = this.formatCallbackArg("FB", this.FuncGetCallBackIndex(onCallBack).toString()) + this.prepareCallbackArgs(args, null);
if (!this.isInitialized) {
if (!_aspxIsExists(this.callBacksOnInit)) {
this.callBacksOnInit = new Array;
}
this.callBacksOnInit.push(args);
return;
}
this.CreateCallback(args, "FUNCTION");
}
=98=
prepareCallbackArgs=function (args, rootTD) {
args = this.formatCallbackArg("EV", this.GetEditorValues(rootTD)) + this.formatCallbackArg("SR", this.GetSelectedState()) + this.formatCallbackArg("FR", this.GetFocusedRowInput()) + this.formatCallbackArg("CR", this.GetColResizedInput()) + this.formatCallbackArg("GB", args);
return args;
}
=99=
formatCallbackArg=function (prefix, arg) {
if (arg == null) {
return "";
}
if (!_aspxIsExists(arg.length) && _aspxIsExists(arg.value)) {
arg = arg.value;
}
if (arg == null || arg == "") {
return "";
}
return prefix + "|" + arg.length + ";" + arg + ";";
}
=100=
OnCallback=function (result) {
if (result.indexOf("FB|") == 0) {
_aspxSetTimeout("aspxGVFuncCallback(\"" + this.name + "\", \"" + escape(result.substr(3)) + "\");", 0);
} else {
var rootTD = this.GetGridTD();
if (rootTD != null) {
rootTD.innerHTML = result;
}
_aspxSetTimeout("aspxRestoreCallBackTimer(\"" + this.name + "\");", 0);
}
}
=101=
OnFuncCallback=function (result) {
var pos = result.indexOf("|");
if (pos < 0) {
return;
}
var index = parseInt(result.substr(0, pos), 10);
var onCallBack = this.GetFuncCallBack(index);
if (onCallBack == null) {
return;
}
result = result.substr(pos + 1);
eval(result);
onCallBack(res);
}
=102=
OnCallbackError=function (result) {
var rootTD = this.GetGridTD();
this.showingError = result;
_aspxRemoveElement(this.loadingPanelElement);
_aspxRemoveElement(this.loadingDivElement);
if (rootTD != null) {
_aspxSetTimeout("aspxRestoreCallBackTimer(\"" + this.name + "\");", 0);
}
}
=103=
ShowError=function (errorText) {
var displayIn = _aspxIsExists(this.GetPopupEditForm()) ? this.GetPopupEditForm() : this;
var errorRow = this.GetEditingErrorRow(displayIn);
if (errorRow == null) {
var editRow = this.GetEditingRow(displayIn);
if (editRow != null) {
errorRow = editRow.parentNode.insertRow(editRow.sectionRowIndex + 1);
errorRow.id = editRow.id.replace("DXEditingRow", "DXEditingErrorRow");
this.ApplyEditingErrorRowStyle(errorRow);
}
}
if (errorRow != null) {
errorRow.cells[errorRow.cells.length - 1].innerHTML = errorText;
} else {
alert(errorText);
}
}
=104=
ApplyEditingErrorRowStyle=function (errorRow) {
var row = this.GetStyleTable().rows[1];
errorRow.className = row.className;
errorRow.style.cssText = row.style.cssText;
for (var i = 0; i < row.cells.length; i++) {
errorRow.appendChild(row.cells[i].cloneNode(true));
}
}
=105=
OnBeforeCallback=function () {
this.CreateLoadingPanel();
this.SaveCallbackSettings();
}
=106=
OnAfterCallback=function () {
if (_aspxIsExists(this.showingError)) {
this.ShowError(this.showingError);
this.showingError = null;
}
this.childrenCache = new Object;
this.lockFilter = true;
try {
this.SetHeadersClientEvents();
this.RestoreCallbackSettings();
this.correctScrollableRow();
} finally {
this.lockFilter = false;
}
}
=107=
SaveCallbackSettings=function () {
this.saveScrollPosition();
var el = this.activeElement;
this.activeElement = null;
this.savedActiveElementId = null;
if (el != null && el.id.indexOf(this.name) == 0) {
this.SaveActiveElementSettings(el);
}
var custWindow = this.GetCustomizationWindow();
if (custWindow != null) {
var custWindowElement = custWindow.GetWindowElement(-1);
if (_aspxIsExists(custWindowElement)) {
this.custwindowLeft = _aspxGetAbsoluteX(custWindowElement) - _aspxGetIEDocumentClientOffset(true);
this.custwindowTop = _aspxGetAbsoluteY(custWindowElement) - _aspxGetIEDocumentClientOffset(false);
this.custwindowVisible = custWindow.IsVisible();
}
} else {
this.custwindowVisible = null;
}
}
=108=
RestoreCallbackSettings=function () {
this.correctTableBodyHeight();
this.restoreScrollPosition();
var custWindow = this.GetCustomizationWindow();
if (custWindow != null && this.custwindowVisible != null) {
if (this.custwindowVisible) {
custWindow.enableAnimation = false;
custWindow.ShowAtPos(this.custwindowLeft, this.custwindowTop);
}
}
this.RestoreActiveElementSettings();
}
=109=
SaveActiveElementSettings=function (element) {
if (element.tagName.toUpperCase() != "INPUT") {
return;
}
this.savedActiveElementId = element.id;
this.savedActiveElementCaret = _aspxGetCaretEnd(element);
}
=110=
RestoreActiveElementSettings=function () {
if (this.savedActiveElementId == null) {
return;
}
var element = _aspxGetElementById(this.savedActiveElementId);
if (_aspxIsExists(element)) {
element.focus();
_aspxSetCaret(element, this.savedActiveElementCaret);
}
this.savedActiveElementId = null;
}
=111=
_isRowSelected=function (visibleIndex) {
if (!_aspxIsExists(this.GetDataRow(visibleIndex))) {
return false;
}
var index = this._getRowIndexOnPage(visibleIndex);
var selInput = this.GetSelectionInput();
if (!_aspxIsExists(selInput)) {
return false;
}
return this._isTrueInCheckList(selInput.value, index);
}
=112=
_isTrueInCheckList=function (checkList, index) {
if (index < 0 || index >= checkList.length) {
return false;
}
return checkList.charAt(index) == "T";
}
=113=
_getSelectedRowCount=function () {
var res = this.selectedWithoutPageRowCount;
var selInput = this.GetSelectionInput();
if (!_aspxIsExists(selInput)) {
return res;
}
var checkList = selInput.value;
var selCount = 0;
for (var i = 0; i < checkList.length; i++) {
if (checkList.charAt(i) == "T") {
selCount++;
}
}
return res + selCount;
}
=114=
_selectAllRowsOnPage=function (checked) {
var selInput = this.GetSelectionInput();
if (!_aspxIsExists(selInput)) {
return;
}
this._selectAllSelBtn(checked);
for (var i = 0; i < this.pageRowCount; i++) {
if (this._isTrueInCheckList(selInput.value, i) != checked) {
this.ChangeRowStyle(i + this.visibleStartIndex, checked ? 0 : 3);
}
}
var selValue = "";
if (checked) {
for (var i = 0; i < this.pageRowCount; i++) {
selValue += "T";
}
}
if (selValue != selInput.value) {
this.userChangedSelection = true;
if (selValue == "") {
selValue = "U";
}
selInput.value = selValue;
}
this.DoSelectionChanged(-1, checked, true);
}
=115=
DeleteGridRow=function (visibleIndex) {
if (this.confirmDelete != "" && !confirm(this.confirmDelete)) {
return;
}
this.DeleteRow(visibleIndex);
}
=116=
_selectAllSelBtn=function (checked) {
if (this.pageRowCount <= 0 ||
!_aspxIsExists(this.GetDataRowSelBtn(this.visibleStartIndex))) {
return;
}
for (var i = 0; i < this.pageRowCount; i++) {
var element = this.GetDataRowSelBtn(i + this.visibleStartIndex);
if (element != null) {
element.checked = checked;
}
}
}
=117=
SelectRowCore=function (visibleIndex, check) {
var checked = false;
if (!_aspxIsExists(check) || !_aspxIsExists(check.checked)) {
checked = !this._isRowSelected(visibleIndex);
} else {
checked = check.checked;
}
this.SelectRow(visibleIndex, checked);
}
=118=
SelectRow=function (visibleIndex, checked) {
var index = this._getRowIndexOnPage(visibleIndex);
if (index < 0) {
return;
}
var selInput = this.GetSelectionInput();
if (_aspxIsExists(selInput)) {
this.userChangedSelection = true;
var checkList = selInput.value;
if (index >= checkList.length) {
if (!checked) {
return;
}
for (var i = checkList.length; i <= index; i++) {
checkList += "F";
}
}
checkList = checkList.substr(0, index) + (checked ? "T" : "F") + checkList.substr(index + 1, checkList.length - index - 1);
if (checkList.indexOf("T") < 0) {
checkList = "U";
}
selInput.value = checkList;
}
this.ChangeRowStyle(visibleIndex, checked ? 0 : 3);
this.DoSelectionChanged(visibleIndex, checked, false);
}
=119=
getRowByHtmlEvent=function (evt) {
var row = _aspxGetParentByPartialId(_aspxGetEventSource(evt), this._constDXDataRow());
if (!_aspxIsExists(row)) {
row = _aspxGetParentByPartialId(_aspxGetEventSource(evt), this._constDXGroupRow());
}
return row;
}
=120=
mainTableClick=function (evt) {
this.getGridByRow(evt).mainTableClickCore(evt);
}
=121=
mainTableClickCore=function (evt) {
var row = this.getRowByHtmlEvent(evt);
if (_aspxIsExists(row)) {
if (this.RaiseRowClick(this.getRowIndex(row.id), evt)) {
return;
}
if (this.allowFocusedRow) {
this.focusRow(row);
}
}
}
=122=
mainTableDblClick=function (evt) {
this.getGridByRow(evt).mainTableDblClickCore(evt);
}
=123=
mainTableDblClickCore=function (evt) {
var row = this.getRowByHtmlEvent(evt);
if (_aspxIsExists(row)) {
this.RaiseRowDblClick(this.getRowIndex(row.id), evt);
}
}
=124=
getGridByRow=function (rowEvt) {
var row = this.getRowByHtmlEvent(rowEvt);
if (!_aspxIsExists(row)) {
return this;
}
var id = row.offsetParent.id;
id = id.substr(0, id.length - this._constDXMainTable().length - 1);
var table = aspxGetControlCollection().Get(id);
return _aspxIsExists(table) ? table : this;
}
=125=
focusRow=function (row) {
if (!_aspxIsExists(row)) {
return;
}
var index = this.getRowIndex(row.id);
this._setFocusedRowIndex(index);
}
=126=
_setFocusedRowIndex=function (visibleIndex) {
if (!this.allowFocusedRow) {
return;
}
var row = this.GetRow(visibleIndex);
if (row == null) {
return;
}
var oldFocusedRow = this.focusedRowIndex;
this.focusedRowIndex = visibleIndex;
this.ChangeRowStyle(oldFocusedRow, this._isRowSelected(oldFocusedRow) ? 0 : 3);
this.ChangeRowStyle(this.focusedRowIndex, this._isGroupRow(row) ? 2 : 1);
if (this.GetFocusedRowInput() != null) {
this.GetFocusedRowInput().value = this.focusedRowIndex;
}
if (this.callbackOnFocusedRowChanged) {
this.gridCallBack("FOCUSEDROW");
return;
}
if (_aspxIsExists(this.RaiseFocusedRowChanged)) {
this.RaiseFocusedRowChanged();
}
}
=127=
_getFocusedRowIndex=function () {
if (!this.allowFocusedRow) {
return -1;
}
return this.focusedRowIndex;
}
=128=
getColumnIndex=function (colId) {
if (colId.indexOf(this._constDXEmptyHeader()) > -1) {
return 0;
}
var index = this._getNumberFromEndOfString(colId);
return colId.indexOf("col" + index) > -1 ? index : -1;
}
=129=
getRowIndex=function (rowId) {
return this._getNumberFromEndOfString(rowId);
}
=130=
_getNumberFromEndOfString=function (st) {
var value = -1;
var n = st.length - 1;
while (parseInt(st.substr , 10) >= 0) {
value = parseInt(st.substr , 10);
n--;
}
return value;
}
=131=
GetSelectedState=function () {
if (!this.userChangedSelection) {
return null;
}
if (!_aspxIsExists(this.GetSelectionInput())) {
return null;
}
return this.GetSelectionInput().value;
}
=132=
ChangeRowStyle=function (visibleIndex, rowStyle) {
if (this._getFocusedRowIndex() == visibleIndex &&
rowStyle != 1 && rowStyle != 2) {
return;
}
var row = this.GetRow(visibleIndex);
if (!_aspxIsExists(row)) {
return;
}
var index = this._getRowIndexOnPage(visibleIndex);
var styleRow = this._getStyleRow(index, rowStyle);
if (!_aspxIsExists(styleRow)) {
return;
}
row.className = styleRow.className;
row.style.cssText = styleRow.style.cssText;
this.correctScrollableRow();
}
=133=
_getRowIndexOnPage=function (visibleIndex) {
return visibleIndex - this.visibleStartIndex;
}
=134=
_getColumnIndexByColumnObject=function (column) {
if (!_aspxIsExists(column)) {
return null;
}
if (_aspxIsExists(column.index)) {
return column.index;
}
return column;
}
=135=
_getColumnObjectByArg=function (arg) {
if (!_aspxIsExists(arg)) {
return null;
}
if (typeof arg == "number") {
return this._getColumn(arg);
}
if (_aspxIsExists(arg.index)) {
return arg;
}
var column = this._getColumnById(arg);
if (_aspxIsExists(column)) {
return column;
}
return this._getColumnByField(arg);
}
=136=
_getColumnsCount=function () {
return this.columns.length;
}
=137=
_getColumn=function (index) {
if (index < 0 || index >= this.columns.length) {
return null;
}
return this.columns[index];
}
=138=
_getColumnById=function (id) {
if (!_aspxIsExists(id)) {
return null;
}
for (var i = 0; i < this.columns.length; i++) {
if (this.columns[i].id == id) {
return this.columns[i];
}
}
return null;
}
=139=
_getColumnByField=function (fieldName) {
if (!_aspxIsExists(fieldName)) {
return null;
}
for (var i = 0; i < this.columns.length; i++) {
if (this.columns[i].fieldName == fieldName) {
return this.columns[i];
}
}
return null;
}
=140=
_getStyleRow=function (index, rowStyle) {
var styleTable = this.GetStyleTable();
if (!_aspxIsExists(styleTable)) {
return null;
}
if (rowStyle < 3) {
return styleTable.rows[rowStyle + 2];
}
return styleTable.rows[5 + index];
}
=141=
DoSelectionChanged=function (index, isSelected, isSelectAllOnPage) {
if (this.callbackOnSelectionChanged) {
this.gridCallBack("SELECTION");
return;
}
if (_aspxIsExists(this.RaiseSelectionChanged)) {
this.RaiseSelectionChanged();
}
}
=142=
HeaderColumnResizing=function (e) {
var element = _aspxGetEventSource(e);
if (!_aspxIsExists(element)) {
return;
}
if (!_aspxIsExistsType(typeof ASPxClientTableColumnResizing)) {
return;
}
if (!_aspxIsExists(this.columnResizing)) {
this.columnResizing = new ASPxClientTableColumnResizing;
this.columnResizing.CanResizeLastColumn = this.getScrollableControl() == null &&
this.isMainControlResizable;
}
var cursor = this.columnResizing.GetCursor(this.GetMainTable(), element, e);
if (_aspxIsExists(cursor) && cursor != "") {
element.style.cursor = cursor;
}
}
=143=
HeaderMouseDown=function (element, e) {
if (!_aspxGetIsLeftButtonPressed(e)) {
return;
}
var source = _aspxGetEventSource(e);
if (_aspxIsExists(source.onclick)) {
return;
}
if (this.startColumnResizing(element, e)) {
return;
}
if (_aspxIsExists(this.RaiseColumnStartDragging)) {
var column = this._getColumnObjectByArg(this.getColumnIndex(element.id));
if (this.RaiseColumnStartDragging(column)) {
return;
}
}
var canDrag = element.id.indexOf(this._constDXDropSource()) > -1 &&
source.tagName != "IMG";
var drag = this.createDrag(e, element, canDrag);
this.createTargets(drag, e);
}
=144=
createDrag=function (e, element, canDrag) {
var drag = new ASPxClientDragHelper(e, element, true);
drag.canDrag = canDrag;
drag.onDragDivCreating = this.DragDivCreating;
drag.grid = this;
drag.ctrl = aspxGetCtrlKey(e);
drag.shift = aspxGetShiftKey(e);
drag.onDoClick = this.headerDoClick;
drag.onCloneCreating = this.cloneCreating;
drag.onEndDrag = this.endDrag;
drag.onCancelDrag = this.cancelDrag;
return drag;
}
=145=
createTargets=function (drag, e) {
if (!drag.canDrag) {
return;
}
var targets = new ASPxClientCursorTargets;
targets.obj = drag.obj;
targets.grid = this;
targets.onTargetChanging = this.targetChanging;
targets.onTargetChanged = this.targetChanged;
var targertIds = new Array;
targertIds.push(this._constDXCustWindow());
targertIds.push(this._constDXDropTarget());
targets.RegisterTargets(this.GetRootTable(), targertIds);
targets.removeInitialTarget(e.clientX, e.clientY);
}
=146=
startColumnResizing=function (element, e) {
if (!_aspxIsExists(this.columnResizing)) {
return false;
}
if (!this.columnResizing.CanStartResizing(this.GetMainTable(), element, e)) {
return false;
}
if (_aspxIsExists(this.RaiseColumnResizing)) {
var column = this._getColumnObjectByArg(this.getColumnIndex(element.id));
if (this.RaiseColumnResizing(column)) {
return false;
}
}
this.setScrollPosition(0);
this.columnResizing.StartResizing(this.GetMainTable(), element, e);
this.columnResizing.SetResizedInput(this.GetColResizedInput());
if (this.isMainControlResizable) {
this.columnResizing.SetResizableControl(this.GetRootTable());
}
this.columnResizing.SetEditorsList(this._getEditors());
return true;
}
=147=
DragDivCreating=function (drag, dragDiv) {
var rootTable = drag.grid.GetRootTable();
if (!_aspxIsExists(dragDiv) || !_aspxIsExists(rootTable)) {
return;
}
dragDiv.className = rootTable.className;
dragDiv.style.cssText = rootTable.style.cssText;
}
=148=
headerDoClick=function (drag) {
if (!drag.grid.getIsColumnCanSort(drag.obj)) {
return;
}
var order = "";
drag.grid.SortBy(drag.grid.getColumnIndex(drag.obj.id), drag.ctrl ? "NONE" : "", !drag.shift && !drag.ctrl);
}
=149=
cancelDrag=function (drag) {
drag.grid.targetImagesChangeVisibility("hidden");
}
=150=
endDrag=function (drag) {
if (drag.targetElement == null) {
return;
}
var grid = drag.grid;
var column = grid.getColumnIndex(drag.obj.id);
var id = drag.targetElement.id;
var columnTo = grid.getColumnIndex(id);
grid.MoveColumn(column, columnTo, drag.targetTag, grid.IsGroupHeader(id), grid.IsGroupHeader(drag.obj.id));
}
=151=
cloneCreating=function (clone) {
var table = document.createElement("table");
table.width = this.obj.offsetWidth + "px";
var row = table.insertRow(-1);
clone.style.borderLeftWidth = __aspxOpera ? "0px" : "";
clone.style.borderTopWidth = "";
clone.style.borderRightWidth = __aspxOpera ? "0px" : "";
row.appendChild(clone);
return table;
}
=152=
targetChanging=function (targets) {
targets.targetTag = targets.isLeftPartOfElement();
if (targets.grid.IsTagertElementGroupPanel(targets)) {
targets.targetTag = true;
if (!targets.grid.getIsColumnCanGroup(targets.obj)) {
targets.targetElement = null;
}
}
}
=153=
IsTagertElementGroupPanel=function (targets) {
return targets.targetElement != null &&
targets.targetElement.id.indexOf("grouppanel") > -1;
}
=154=
targetChanged=function (targets) {
if (__aspxDragHelper == null) {
return;
}
if (targets.targetElement == __aspxDragHelper.obj) {
return;
}
if (targets.targetElement != null) {
__aspxDragHelper.targetElement = targets.targetElement;
__aspxDragHelper.targetTag = targets.targetTag;
var left = _aspxGetAbsoluteX(targets.targetElement);
if (targets.targetTag == false) {
left += targets.targetElement.offsetWidth;
}
targets.grid.setDragImagesPosition(targets.targetElement, left);
} else {
__aspxDragHelper.targetElement = null;
targets.grid.targetImagesChangeVisibility("hidden");
}
}
=155=
targetImagesChangeVisibility=function (vis) {
if (this.GetArrowDragDownImage() == null) {
return;
}
this.GetArrowDragDownImage().style.visibility = vis;
this.GetArrowDragUpImage().style.visibility = vis;
if (__aspxDragHelper != null) {
__aspxDragHelper.removeElementFromDragDiv();
}
}
=156=
setDragImagesPosition=function (el, left) {
this.targetImagesChangeVisibility("hidden");
if (el == this.getCustomizationWindowElement()) {
__aspxDragHelper.addElementToDragDiv(this.GetArrowDragFieldImage());
} else {
left -= _aspxGetPositionElementOffset(el, left);
var top = _aspxGetAbsoluteY(el) - _aspxGetPositionElementOffset(el, false);
this.targetImagesChangeVisibility("visible");
if (this.GetArrowDragDownImage() != null) {
this.GetArrowDragDownImage().style.left = left + "px";
this.GetArrowDragUpImage().style.left = left + "px";
this.GetArrowDragDownImage().style.top = top - this.GetArrowDragDownImage().offsetHeight + "px";
this.GetArrowDragUpImage().style.top = top + el.offsetHeight + "px";
}
}
}
=157=
getCustomizationWindowElement=function () {
if (this.GetCustomizationWindow() != null) {
return this.GetCustomizationWindow().GetWindowElement(-1);
}
return null;
}
=158=
OnParentRowMouseEnter=function (element) {
if (this.GetParentRowsWindow() == null) {
return;
}
if (this.GetParentRowsWindow().IsWindowVisible()) {
return;
}
this.ParentRowsTimerId = _aspxSetTimeout("aspxGVParentRowsTimer(\"" + this.name + "\", \"" + element.id + "\");", 500);
}
=159=
OnParentRowMouseLeave=function (evt) {
if (_aspxIsExists(this.ParentRowsTimerId)) {
_aspxClearTimer(this.ParentRowsTimerId);
}
if (this.GetParentRowsWindow() == null) {
return;
}
if (_aspxIsExists(evt) && _aspxIsExists(evt.toElement)) {
if (_aspxGetParentByPartialId(evt.toElement, this.GetParentRowsWindow().name) != null) {
return;
}
}
this.HideParentRows();
}
=160=
ShowParentRows=function (element) {
this.ParentRowsTimerId = null;
if (this.GetParentRowsWindow() != null) {
this.GetParentRowsWindow().ShowAtElement(element);
}
}
=161=
HideParentRows=function () {
this.ParentRowsTimerId = null;
if (this.GetParentRowsWindow() != null) {
this.GetParentRowsWindow().Hide();
}
}
=162=
getIsColumnCanSort=function (colElement) {
return this.getIsColumnCanDoOperation(colElement, "S");
}
=163=
getIsColumnCanGroup=function (colElement) {
return colElement.id.indexOf(this._constDXCanGroup()) > -1;
}
=164=
getIsColumnCanDoOperation=function (colElement, op) {
return colElement.id.indexOf(op) > -1;
}
=165=
doPagerOnClick=function (id) {
if (!_aspxIsExists(id)) {
return;
}
this.gridCallBack("PAGERONCLICK|" + id);
}
=166=
OnColumnFilterInputChanged=function (editor) {
this.ApplyColumnAutoFilterCore(editor);
}
=167=
OnColumnFilterInputSpecKeyPress=function (editor, e) {
if (_aspxIsExists(e.htmlEvent)) {
e = e.htmlEvent;
}
if (e.keyCode == 13) {
e.cancelBubble = true;
e.returnValue = false;
editor.Validate();
this.ApplyColumnAutoFilterCore(editor);
return;
}
if (e.keyCode == 46 && e.ctrlKey) {
e.cancelBubble = true;
e.returnValue = false;
editor.SetValue(null);
this.ApplyColumnAutoFilterCore(editor);
return;
}
}
=168=
OnColumnFilterInputKeyPress=function (editor, e) {
this.OnColumnFilterInputSpecKeyPress(editor, e);
if (_aspxIsExists(e.htmlEvent)) {
e = e.htmlEvent;
}
if (e.keyCode == 9) {
e.cancelBubble = true;
}
if (e.keyCode == 13) {
return;
}
if (e.keyCode == 46 && e.ctrlKey) {
return;
}
this.ClearAutoFilterInputTimer();
if (editor != this.FilterKeyPressEditor) {
this.filterKeyPressInputValue = editor.GetValueString();
}
this.FilterKeyPressEditor = editor;
this.filterKeyPressTimerId = _aspxSetTimeout("aspxGVTimer(\"" + this.name + "\");", this.autoFilterDelay);
}
=169=
ClearAutoFilterInputTimer=function () {
this.filterKeyPressTimerId = _aspxClearTimer(this.filterKeyPressTimerId);
}
=170=
GetAutoFilterEditorInputElement=function (editor) {
if (_aspxIsExists(document.activeElement)) {
return document.activeElement;
}
if (_aspxIsExists(editor.GetInputElement)) {
return editor.GetInputElement();
}
return null;
}
=171=
OnFilterKeyPressTick=function () {
if (_aspxIsExists(this.FilterKeyPressEditor)) {
this.ApplyColumnAutoFilterCore(this.FilterKeyPressEditor);
}
}
=172=
ApplyColumnAutoFilterCore=function (editor) {
if (this.lockFilter) {
return;
}
this.ClearAutoFilterInputTimer();
if (_aspxIsExists(this.FilterKeyPressEditor) &&
editor == this.FilterKeyPressEditor) {
if (this.FilterKeyPressEditor.GetValueString() == this.filterKeyPressInputValue) {
return;
}
}
var column = this.getColumnIndex(editor.name);
if (column < 0) {
return;
}
this.activeElement = this.GetAutoFilterEditorInputElement(editor);
this.AutoFilterByColumn(column, editor.GetValueString());
}
=173=
CreateLoadingPanel=function () {
var content = this.GetGridTD();
if (content == null) {
return;
}
this.correctScrollableRow();
this.loadingDivElement = this.CreateLoadingDiv(content);
var lpContainer = this.GetLoadingPanelContainer();
this.loadingPanelElement = lpContainer == null ? this.CreateLoadingPanelWithAbsolutePosition(content) : this.CreateLoadingPanelInline(lpContainer);
}
=174=
_updateEdit=function () {
var list = this._getEditors();
if (list.length != 0) {
if (!this._validate(list)) {
return;
}
}
this.gridCallBack("UPDATEEDIT");
}
=175=
_validate=function (list) {
for (var i = 0; i < list.length; i++) {
if (!list[i].GetIsValid()) {
list[i].Focus();
return false;
}
}
return true;
}
=176=
_getEditors=function () {
var list = new Array;
var elements = aspxGetControlCollection().elements;
for (var name in elements) {
if (name.indexOf(this.name + "_") == 0) {
if (name.indexOf(this.name + "_dxdt") == 0) {
continue;
}
var el = elements[name];
if (_aspxIsExists(el.GetMainElement) &&
_aspxIsExists(el.GetMainElement()) &&
_aspxIsValidElement(el.GetMainElement())) {
var index = name.indexOf(this.GetEditorPrefix());
if (index > 0 && name.indexOf("_", index) == -1) {
list.push(el);
}
}
}
}
return list;
}
=177=
GetEditorValues=function () {
var list = this._getEditors();
if (list.length == 0) {
return null;
}
var res = list.length + ";";
for (var i = 0; i < list.length; i++) {
res += this.GetEditorValue(list[i]);
}
return res;
}
=178=
GetEditorValue=function (editor) {
var value = editor.GetValueString();
var valueLength = -1;
if (!_aspxIsExists(value)) {
value = "";
} else {
value = value.toString();
valueLength = value.length;
}
return this.GetEditorIndex(editor.name) + "," + valueLength + "," + value + ";";
}
=179=
GetEditorIndex=function (editorId) {
var i = editorId.lastIndexOf(this.GetEditorPrefix());
if (i < 0) {
return -1;
}
return editorId.substr(i + this.GetEditorPrefix().length);
}
=180=
saveScrollPosition=function () {
this.savedScrollPosition = 0;
var scrollDiv = this.getScrollableControl();
if (scrollDiv == null) {
return;
}
this.savedScrollPosition = scrollDiv.scrollTop;
}
=181=
restoreScrollPosition=function () {
if (this.savedScrollPosition == 0) {
return;
}
this.setScrollPosition(this.savedScrollPosition);
}
=182=
setScrollPosition=function (newScrolPos) {
var scrollDiv = this.getScrollableControl();
if (scrollDiv != null) {
scrollDiv.scrollTop = newScrolPos;
}
}
=183=
getScrollableControl=function () {
var scrollDiv = this.GetScrollDiv();
if (scrollDiv == null) {
return null;
}
if (__aspxFirefox) {
var table = this.GetMainTable();
if (table == null || table.tBodies.length == 0) {
return null;
}
return table.tBodies[0];
}
return scrollDiv;
}
=184=
correctTableBodyHeight=function () {
if (__aspxIE) {
return;
}
if (this.GetScrollDiv() == null) {
return;
}
var table = this.GetMainTable();
if (table == null || table.tBodies.length == 0) {
return;
}
var height = this.GetScrollDiv().offsetHeight;
if (_aspxIsExists(table.tHead)) {
height -= this.getTableRowSectionHeight(table.tHead);
}
if (_aspxIsExists(table.tFoot)) {
height -= this.getTableRowSectionHeight(table.tFoot);
}
table.tBodies[0].style.height = height + "px";
}
=185=
getTableRowSectionHeight=function (tableSection) {
var res = 0;
for (var i = 0; i < tableSection.rows.length; i++) {
var row = tableSection.rows[i];
if (row.cells.length > 0) {
res += row.cells[0].offsetHeight;
}
}
return res;
}
=186=
SetHeadersClientEvents=function () {
var row = this.GetHeadersRow();
if (row == null) {
return;
}
for (var i = 0; i < row.cells.length; i++) {
if (this.isColumnsResizable) {
_aspxAttachEventToElement(row.cells[i], "mousemove", new Function("event", "aspxGVHeaderColumnResizing('" + this.name + "', event);"));
}
}
}
=187=
correctScrollableRow=function () {
var row = this.GetScrollableRow();
if (row == null) {
return;
}
row.style.left = 1;
row.style.left = 0;
if (this.GetScrollDiv() == null) {
return;
}
var scrollTop = this.GetScrollDiv().scrollTop;
row.style.top = scrollTop + 1;
row.style.top = scrollTop;
}
=188=
PerformCallback=function (args) {
if (!_aspxIsExists(args)) {
args = "";
}
this.gridCallBack("CUSTOMCALLBACK|" + args);
}
=189=
GetValuesOnCustomCallback=function (args, onCallBack) {
this.gridFuncCallBack("CUSTOMVALUES|" + args, onCallBack);
}
=190=
GotoPage=function (pageIndex) {
this.gridCallBack("GOTOPAGE|" + pageIndex);
}
=191=
NextPage=function () {
this.gridCallBack("NEXTPAGE");
}
=192=
PrevPage=function () {
this.gridCallBack("PREVPAGE");
}
=193=
UnGroup=function (column) {
column = this._getColumnIndexByColumnObject(column);
this.GroupBy(column, -1);
}
=194=
ExpandAll=function () {
this.gridCallBack("EXPANDALL");
}
=195=
CollapseAll=function () {
this.gridCallBack("COLLAPSEALL");
}
=196=
ExpandAllDetailRows=function () {
this.gridCallBack("SHOWALLDETAIL");
}
=197=
CollapseAllDetailRows=function () {
this.gridCallBack("HIDEALLDETAIL");
}
=198=
ExpandRow=function (visibleIndex, recursive) {
if (this.RaiseRowExpanding(visibleIndex)) {
return;
}
if (!_aspxIsExists(recursive)) {
recursive = false;
}
this.gridCallBack("EXPANDROW|" + visibleIndex + "|" + recursive);
}
=199=
CollapseRow=function (visibleIndex, recursive) {
if (this.RaiseRowCollapsing(visibleIndex)) {
return;
}
if (!_aspxIsExists(recursive)) {
recursive = false;
}
this.gridCallBack("COLLAPSEROW|" + visibleIndex + "|" + recursive);
}
=200=
ExpandDetailRow=function (visibleIndex) {
this.gridCallBack("SHOWDETAILROW|" + visibleIndex);
}
=201=
CollapseDetailRow=function (visibleIndex) {
this.gridCallBack("HIDEDETAILROW|" + visibleIndex);
}
=202=
StartEditRow=function (visibleIndex) {
this.gridCallBack("STARTEDIT|" + visibleIndex);
}
=203=
UpdateEdit=function () {
this._updateEdit();
}
=204=
CancelEdit=function () {
this.gridCallBack("CANCELEDIT");
}
=205=
AddNewRow=function () {
this.gridCallBack("ADDNEWROW");
}
=206=
DeleteRow=function (visibleIndex) {
this.gridCallBack("DELETEROW|" + visibleIndex);
}
=207=
ApplyFilter=function (expression) {
if (!_aspxIsExists(expression)) {
expression = "";
}
this.gridCallBack("APPLYFILTER|" + expression);
}
=208=
ClearFilter=function () {
this.ApplyFilter();
}
=209=
AutoFilterByColumn=function (column, val) {
column = this._getColumnIndexByColumnObject(column);
if (!_aspxIsExists(column)) {
return;
}
if (!_aspxIsExists(val)) {
val = "";
}
if (val.length > 255) {
val = val.substr(0, 255);
}
this.gridCallBack("APPLYCOLUMNFILTER|" + column + "|" + val);
}
=210=
GroupBy=function (column, groupIndex, sortOrder) {
if (this.RaiseColumnGrouping(this._getColumnObjectByArg(column))) {
return;
}
column = this._getColumnIndexByColumnObject(column);
if (!_aspxIsExists(groupIndex)) {
groupIndex = "";
}
if (!_aspxIsExists(sortOrder)) {
sortOrder = "ASC";
}
this.gridCallBack("GROUP|" + column + "|" + groupIndex + "|" + sortOrder);
}
=211=
SortBy=function (column, sortOrder, reset, sortIndex) {
if (this.RaiseColumnSorting(this._getColumnObjectByArg(column))) {
return;
}
column = this._getColumnIndexByColumnObject(column);
if (!_aspxIsExists(sortIndex)) {
sortIndex = "";
}
if (!_aspxIsExists(sortOrder)) {
sortOrder = "";
}
if (!_aspxIsExists(reset)) {
reset = true;
}
this.gridCallBack("SORT|" + column + "|" + sortIndex + "|" + sortOrder + "|" + reset);
}
=212=
MoveColumn=function (column, columnMoveTo, moveBefore, moveToGroup, moveFromGroup) {
if (!_aspxIsExists(column)) {
return;
}
if (!_aspxIsExists(columnMoveTo)) {
columnMoveTo = -1;
}
if (!_aspxIsExists(moveBefore)) {
moveBefore = true;
}
if (!_aspxIsExists(moveToGroup)) {
moveToGroup = false;
}
if (!_aspxIsExists(moveFromGroup)) {
moveFromGroup = false;
}
if (moveToGroup) {
if (this.RaiseColumnGrouping(this._getColumnObjectByArg(column))) {
return;
}
}
column = this._getColumnIndexByColumnObject(column);
this.gridCallBack("COLUMNMOVE|" + column + "|" + columnMoveTo + "|" + moveBefore + "|" + moveToGroup + "|" + moveFromGroup);
}
=213=
GetFocusedRowIndex=function () {
return this._getFocusedRowIndex();
}
=214=
SetFocusedRowIndex=function (visibleIndex) {
return this._setFocusedRowIndex(visibleIndex);
}
=215=
IsCustomizationWindowVisible=function () {
var custWindow = this.GetCustomizationWindow();
return custWindow != null && custWindow.IsVisible();
}
=216=
ShowCustomizationWindow=function (showAtElement) {
var custWindow = this.GetCustomizationWindow();
if (!_aspxIsExists(showAtElement)) {
showAtElement = this.GetMainTable();
}
custWindow.ShowAtElement(showAtElement);
}
=217=
HideCustomizationWindow=function () {
var custWindow = this.GetCustomizationWindow();
if (custWindow != null) {
custWindow.Hide();
}
}
=218=
SelectRows=function (visibleIndices, selected) {
if (!_aspxIsExists(selected)) {
selected = true;
}
if (!_aspxIsExists(visibleIndices)) {
selected = selected ? "all" : "unall";
visibleIndices = "|0";
} else {
var res = "";
if (_aspxIsFunction(visibleIndices.push)) {
for (var i = 0; i < visibleIndices.length; i++) {
res = res + "|" + visibleIndices[i];
}
} else {
res = "|" + visibleIndices;
}
visibleIndices = res;
}
this.gridCallBack("SELECTROWS|" + selected + visibleIndices);
}
=219=
SelectRowsByKey=function (keys, selected) {
if (!_aspxIsExists(selected)) {
selected = true;
}
if (!_aspxIsExists(keys)) {
return;
}
var res = "";
if (_aspxIsFunction(keys.push)) {
for (var i = 0; i < keys.length; i++) {
res = res + "|" + keys[i];
}
} else {
res = "|" + keys;
}
keys = res;
this.gridCallBack("SELECTROWSKEY|" + selected + keys);
}
=220=
UnselectRowsByKey=function (keys) {
this.SelectRowsByKey(keys, false);
}
=221=
UnselectRows=function (visibleIndices) {
this.SelectRows(visibleIndices, false);
}
=222=
SelectRowOnPage=function (visibleIndex, selected) {
if (!_aspxIsExists(selected)) {
selected = true;
}
this.SelectRow(visibleIndex, selected);
}
=223=
UnselectRowOnPage=function (visibleIndex) {
this.SelectRowOnPage(visibleIndex, false);
}
=224=
SelectAllRowsOnPage=function (selected) {
if (!_aspxIsExists(selected)) {
selected = true;
}
this._selectAllRowsOnPage(selected);
}
=225=
UnselectAllRowsOnPage=function () {
this._selectAllRowsOnPage(false);
}
=226=
GetSelectedRowCount=function () {
return this._getSelectedRowCount();
}
=227=
GetSelectedFieldValues=function (fieldNames, onCallBack) {
this.gridFuncCallBack("SELFIELDVALUES|" + fieldNames, onCallBack);
}
=228=
GetRowValues=function (visibleIndex, fieldNames, onCallBack) {
this.gridFuncCallBack("ROWVALUES|" + visibleIndex + "|" + fieldNames, onCallBack);
}
=229=
GetPageRowValues=function (fieldNames, onCallBack) {
this.gridFuncCallBack("PAGEROWVALUES|" + fieldNames, onCallBack);
}
=230=
GetColumnsCount=function () {
return this._getColumnsCount();
}
=231=
GetColumn=function (index) {
return this._getColumn(index);
}
=232=
GetColumnById=function (id) {
return this._getColumnById(id);
}
=233=
GetColumnByField=function (fieldName) {
return this._getColumnByField(fieldName);
}
=234=
GetEditor=function (column) {
var columnObject = this._getColumnObjectByArg(column);
return columnObject != null ? this.GetEditorByColumnIndex(columnObject.index) : null;
}
=235=
GetEditValue=function (column) {
var editor = this.GetEditor(column);
return editor != null ? editor.GetValue() : null;
}
=236=
SetEditValue=function (column, value) {
var editor = this.GetEditor(column);
if (editor != null) {
editor.SetValue(value);
}
}
=237=
RaiseSelectionChanged=function () {
if (!this.SelectionChanged.IsEmpty()) {
var args = new ASPxClientProcessingModeEventArgs(false);
this.SelectionChanged.FireEvent(this, args);
if (args.processOnServer) {
this.PerformCallback();
}
}
return false;
}
=238=
RaiseFocusedRowChanged=function () {
if (!this.FocusedRowChanged.IsEmpty()) {
var args = new ASPxClientProcessingModeEventArgs(false);
this.FocusedRowChanged.FireEvent(this, args);
if (args.processOnServer) {
this.PerformCallback();
}
}
return false;
}
=239=
RaiseColumnSorting=function (column) {
if (!this.ColumnSorting.IsEmpty()) {
var args = new ASPxClientGridViewColumnCancelEventArgs(column);
this.ColumnSorting.FireEvent(this, args);
return args.cancel;
}
return false;
}
=240=
RaiseColumnGrouping=function (column) {
if (!this.ColumnGrouping.IsEmpty()) {
var args = new ASPxClientGridViewColumnCancelEventArgs(column);
this.ColumnGrouping.FireEvent(this, args);
return args.cancel;
}
return false;
}
=241=
RaiseColumnStartDragging=function (column) {
if (!this.ColumnStartDragging.IsEmpty()) {
var args = new ASPxClientGridViewColumnCancelEventArgs(column);
this.ColumnStartDragging.FireEvent(this, args);
return args.cancel;
}
return false;
}
=242=
RaiseColumnResizing=function (column) {
if (!this.ColumnResizing.IsEmpty()) {
var args = new ASPxClientGridViewColumnCancelEventArgs(column);
this.ColumnResizing.FireEvent(this, args);
return args.cancel;
}
return false;
}
=243=
RaiseRowExpanding=function (visibleIndex) {
if (!this.RowExpanding.IsEmpty()) {
var args = new ASPxClientGridViewRowCancelEventArgs(visibleIndex);
this.RowExpanding.FireEvent(this, args);
return args.cancel;
}
return false;
}
=244=
RaiseRowCollapsing=function (visibleIndex) {
if (!this.RowCollapsing.IsEmpty()) {
var args = new ASPxClientGridViewRowCancelEventArgs(visibleIndex);
this.RowCollapsing.FireEvent(this, args);
return args.cancel;
}
return false;
}
=245=
RaiseRowClick=function (visibleIndex, htmlEvent) {
if (!this.RowClick.IsEmpty()) {
var args = new ASPxClientGridViewRowClickEventArgs(visibleIndex, htmlEvent);
this.RowClick.FireEvent(this, args);
return args.cancel;
}
return false;
}
=246=
RaiseRowDblClick=function (visibleIndex, htmlEvent) {
if (!this.RowDblClick.IsEmpty()) {
var args = new ASPxClientGridViewRowClickEventArgs(visibleIndex, htmlEvent);
this.RowDblClick.FireEvent(this, args);
return args.cancel;
}
return false;
}
=247=
RaiseContextMenu=function (objectType, index, htmlEvent) {
if (!this.ContextMenu.IsEmpty()) {
var args = new ASPxClientGridViewContextMenuEventArgs(objectType, index, htmlEvent);
this.ContextMenu.FireEvent(this, args);
return true;
}
return false;
}
=248=
RaiseCustomizationWindowCloseUp=function () {
if (!this.CustomizationWindowCloseUp.IsEmpty()) {
var args = new ASPxClientEventArgs;
this.CustomizationWindowCloseUp.FireEvent(this, args);
}
return false;
}
=249=
RaiseBeginCallback=function (command) {
if (!this.BeginCallback.IsEmpty()) {
var args = new ASPxClientCallbackEventArgs(command);
this.BeginCallback.FireEvent(this, args);
}
}
=250=
AfterInitialize=function () {
this.isInitialized = true;
if (_aspxIsExists(this.RaiseInit)) {
this.RaiseInit();
}
}
=251=
InitializeCallBackData=function () {
}
=252=
CollapseControl=function (checkSizeCorrectedFlag) {
}
=253=
CorrectSize=function (checkSizeCorrectedFlag) {
}
=254=
RegisterServerEventAssigned=function (eventNames) {
for (var i = 0; i < eventNames.length; i++) {
this.serverEvents[eventNames[i]] = true;
}
}
=255=
IsServerEventAssigned=function (eventName) {
return _aspxIsExists(this.serverEvents[eventName]);
}
=256=
GetChild=function (idPostfix) {
var mainElement = this.GetMainElement();
return _aspxIsExists(mainElement) ? _aspxGetChildById(this.GetMainElement(), this.name + idPostfix) : null;
}
=257=
GetItemElementName=function (element) {
var name = "";
if (_aspxIsExists(element.id)) {
name = element.id.substring(this.name.length + 1);
}
return name;
}
=258=
GetLinkElement=function (element) {
if (element != null) {
if (element.tagName.toUpperCase() == "A") {
return element;
} else {
return _aspxGetChildByTagName(element, "A", 0);
}
}
return null;
}
=259=
GetMainElement=function () {
if (!_aspxIsExistsElement(this.mainElement)) {
this.mainElement = _aspxGetElementById(this.name);
}
return this.mainElement;
}
=260=
OnControlClick=function (clickedElement, htmlEvent) {
}
=261=
GetLoadingPanelElement=function () {
return _aspxGetElementById(this.name + "_LP");
}
=262=
CreateLoadingPanelClone=function (element, parentElement) {
var cloneElement = element.cloneNode(true);
cloneElement.id = element.id + "V";
parentElement.appendChild(cloneElement);
return cloneElement;
}
=263=
CreateLoadingPanelInsideContainer=function (parentElement) {
if (parentElement == null) {
return;
}
var element = this.GetLoadingPanelElement();
if (element != null) {
var itemsTable = _aspxGetChildByTagName(parentElement, "TABLE", 0);
var width = itemsTable != null ? itemsTable.offsetWidth : parentElement.clientWidth;
var height = itemsTable != null ? itemsTable.offsetHeight : parentElement.clientHeight;
parentElement.innerHTML = "";
var table = document.createElement("TABLE");
parentElement.appendChild(table);
table.border = 0;
table.cellPadding = 0;
table.cellSpacing = 0;
table.style.height = height + "px";
table.style.width = width + "px";
var tbody = document.createElement("TBODY");
table.appendChild(tbody);
var tr = document.createElement("TR");
tbody.appendChild(tr);
var td = document.createElement("TD");
tr.appendChild(td);
td.align = "center";
td.vAlign = "middle";
element = this.CreateLoadingPanelClone(element, td);
_aspxSetElementDisplay(element, true);
return element;
} else {
parentElement.innerHTML = " ";
}
return null;
}
=264=
CreateLoadingPanelWithAbsolutePosition=function (parentElement, offsetElement) {
if (parentElement == null) {
return;
}
if (!_aspxIsExists(offsetElement)) {
offsetElement = parentElement;
}
var element = this.GetLoadingPanelElement();
if (element != null) {
element = this.CreateLoadingPanelClone(element, parentElement);
element.style.position = "absolute";
_aspxSetElementDisplay(element, true);
this.SetLoadingPanelLocation(offsetElement, element);
return element;
}
return null;
}
=265=
CreateLoadingPanelInline=function (parentElement) {
if (parentElement == null) {
return;
}
var element = this.GetLoadingPanelElement();
if (element != null) {
element = this.CreateLoadingPanelClone(element, parentElement);
_aspxSetElementDisplay(element, true);
return element;
}
return null;
}
=266=
SetLoadingPanelLocation=function (element, loadingPanel) {
var ptX = this.GetElementScrollLocationAndSize(_aspxGetAbsoluteX(element), element.offsetWidth, _aspxGetDocumentScrollLeft(), _aspxGetDocumentClientWidth());
var ptY = this.GetElementScrollLocationAndSize(_aspxGetAbsoluteY(element), element.offsetHeight, _aspxGetDocumentScrollTop(), _aspxGetDocumentClientHeight());
loadingPanel.style.left = ptX.pos + (ptX.size - loadingPanel.offsetWidth) / 2 - _aspxGetOffset(element, true) + "px";
loadingPanel.style.top = ptY.pos + (ptY.size - loadingPanel.offsetHeight) / 2 - _aspxGetOffset(element, false) + "px";
}
=267=
GetElementScrollLocationAndSize=function (abs, size, scrollPos, scrollSize) {
var pt = new Object;
pt.pos = abs;
pt.size = size;
if (abs < scrollPos + scrollSize) {
if (abs < scrollPos) {
pt.pos = scrollPos;
pt.size -= scrollPos - abs;
}
if (pt.size + pt.pos > scrollPos + scrollSize) {
pt.size = scrollSize - (pt.pos - scrollPos);
}
}
return pt;
}
=268=
GetLoadingDiv=function () {
return _aspxGetElementById(this.name + "_LD");
}
=269=
CreateLoadingDiv=function (parentElement, offsetElement) {
if (parentElement == null) {
return;
}
if (!_aspxIsExists(offsetElement)) {
offsetElement = parentElement;
}
var div = this.GetLoadingDiv();
if (div != null) {
div = div.cloneNode(true);
parentElement.appendChild(div);
div.style.position = "absolute";
div.style.left = _aspxGetRelevantX(offsetElement, parentElement) + "px";
div.style.top = _aspxGetRelevantY(offsetElement, parentElement) + "px";
div.style.width = offsetElement.offsetWidth + "px";
div.style.height = offsetElement.offsetHeight + "px";
_aspxSetElementDisplay(div, true);
return div;
}
return null;
}
=270=
InCallback=function () {
return this.requestCount > 0;
}
=271=
DoBeginCallback=function (command) {
if (_aspxIsExists(this.RaiseBeginCallback)) {
if (!_aspxIsExists(command)) {
command = "";
}
this.RaiseBeginCallback(command);
}
if (_aspxIsExists(WebForm_InitCallback)) {
__theFormPostData = "";
__theFormPostCollection = new Array;
this.ClearPostBackEventInput("__EVENTTARGET");
this.ClearPostBackEventInput("__EVENTARGUMENT");
WebForm_InitCallback();
}
}
=272=
ClearPostBackEventInput=function (id) {
var element = _aspxGetElementById(id);
if (element != null) {
element.value = "";
}
}
=273=
CreateCallback=function (arg, command) {
if (!this.CanCreateCallback()) {
return;
}
this.requestCount++;
this.DoBeginCallback(command);
this.callBack(arg);
}
=274=
CanCreateCallback=function () {
return this.allowMultipleCallbacks || !this.InCallback();
}
=275=
DoEndCallback=function () {
_aspxSetTimeout(_aspxProcessScripts, 1);
_aspxSetTimeout(_aspxProcessLinks, 1);
if (_aspxIsExists(this.RaiseEndCallback)) {
this.RaiseEndCallback();
}
}
=276=
DoCallback=function (result) {
this.requestCount--;
if (result.indexOf(__aspxCallBackErrorPrefix) > -1) {
this.DoCallbackError(result);
} else {
this.OnCallback(result);
}
this.DoEndCallback();
}
=277=
DoCallbackError=function (result) {
var pos = result.indexOf(__aspxCallBackErrorPrefix);
if (pos > -1) {
result = result.substr(pos + __aspxCallBackErrorPrefix.length);
} else {
result = "A server error has occurred while a callBack has being processed on the server.";
}
this.OnCallbackError(result);
}
=278=
DoControlClick=function (evt) {
var clickedElement = __aspxIE ? evt.srcElement : evt.target;
this.OnControlClick(clickedElement, evt);
}
=279=
SendPostBack=function (params) {
__doPostBack(this.uniqueID, params);
}
=280=
RaiseInit=function () {
if (!this.Init.IsEmpty()) {
var args = new ASPxClientEventArgs;
this.Init.FireEvent(this, args);
}
}
=281=
RaiseEndCallback=function () {
if (!this.EndCallback.IsEmpty()) {
var args = new ASPxClientEventArgs;
this.EndCallback.FireEvent(this, args);
}
}
|
|