ASPxClientGridViewColumn = _aspxCreateClass(null, { constructor: function(id, index, fieldName){ this.id = id; this.index = index; this.fieldName = fieldName;}
}); ASPxClientGridViewColumnCancelEventArgs = _aspxCreateClass(ASPxClientCancelEventArgs, { constructor: function(column){ this.constructor.prototype.constructor.call(this, true); this.column = column;}
}); ASPxClientGridViewRowCancelEventArgs = _aspxCreateClass(ASPxClientCancelEventArgs, { constructor: function(visibleIndex){ this.constructor.prototype.constructor.call(this, true); this.visibleIndex = visibleIndex;}
}); ASPxClientGridViewRowClickEventArgs = _aspxCreateClass(ASPxClientGridViewRowCancelEventArgs, { constructor: function(visibleIndex, htmlEvent){ this.constructor.prototype.constructor.call(this, visibleIndex); this.htmlEvent = htmlEvent;}
}); ASPxClientGridViewContextMenuEventArgs = _aspxCreateClass(ASPxClientEventArgs, { constructor: function(objectType, index, htmlEvent){ this.constructor.prototype.constructor.call(this); this.objectType = objectType; this.index = index; this.htmlEvent = htmlEvent;}
}); ASPxClientGridView.prototype.PerformCallback = function(args){ if(!_aspxIsExists(args)) args = ""; this.gridCallBack("CUSTOMCALLBACK|" + args);}
ASPxClientGridView.prototype.GetValuesOnCustomCallback = function(args, onCallBack) { this.gridFuncCallBack("CUSTOMVALUES|" + args, onCallBack);}
ASPxClientGridView.prototype.GotoPage = function(pageIndex){ this.gridCallBack("GOTOPAGE|" + pageIndex);}
ASPxClientGridView.prototype.NextPage = function(){ this.gridCallBack("NEXTPAGE");}
ASPxClientGridView.prototype.PrevPage = function(){ this.gridCallBack("PREVPAGE");}
ASPxClientGridView.prototype.UnGroup = function(column){ column = this._getColumnIndexByColumnObject(column); this.GroupBy(column, -1)
}
ASPxClientGridView.prototype.ExpandAll = function(){ this.gridCallBack("EXPANDALL");}
ASPxClientGridView.prototype.CollapseAll = function(){ this.gridCallBack("COLLAPSEALL");}
ASPxClientGridView.prototype.ExpandAllDetailRows = function(){ this.gridCallBack("SHOWALLDETAIL");}
ASPxClientGridView.prototype.CollapseAllDetailRows = function(){ this.gridCallBack("HIDEALLDETAIL");}
ASPxClientGridView.prototype.ExpandRow = function(visibleIndex, recursive){ if(this.RaiseRowExpanding(visibleIndex)) return; if(!_aspxIsExists(recursive)) recursive = false; this.gridCallBack("EXPANDROW|"+visibleIndex+"|"+recursive);}
ASPxClientGridView.prototype.CollapseRow = function(visibleIndex, recursive){ if(this.RaiseRowCollapsing(visibleIndex)) return; if(!_aspxIsExists(recursive)) recursive = false; this.gridCallBack("COLLAPSEROW|"+visibleIndex+"|"+recursive);}
ASPxClientGridView.prototype.ExpandDetailRow = function(visibleIndex){ this.gridCallBack("SHOWDETAILROW|"+visibleIndex);}
ASPxClientGridView.prototype.CollapseDetailRow = function(visibleIndex){ this.gridCallBack("HIDEDETAILROW|"+visibleIndex);}
ASPxClientGridView.prototype.StartEditRow = function(visibleIndex){ this.gridCallBack("STARTEDIT|"+visibleIndex);}
ASPxClientGridView.prototype.UpdateEdit = function(){ this._updateEdit();}
ASPxClientGridView.prototype.CancelEdit = function(){ this.gridCallBack("CANCELEDIT");}
ASPxClientGridView.prototype.AddNewRow = function(){ this.gridCallBack("ADDNEWROW");}
ASPxClientGridView.prototype.DeleteRow = function(visibleIndex){ this.gridCallBack("DELETEROW|"+visibleIndex);}
ASPxClientGridView.prototype.ApplyFilter = function(expression){ if(!_aspxIsExists(expression)) expression = ""; this.gridCallBack("APPLYFILTER|"+expression);}
ASPxClientGridView.prototype.ClearFilter = function(){ this.ApplyFilter();}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.GetFocusedRowIndex = function() { return this._getFocusedRowIndex();}
ASPxClientGridView.prototype.SetFocusedRowIndex = function(visibleIndex) { return this._setFocusedRowIndex(visibleIndex);}
ASPxClientGridView.prototype.IsCustomizationWindowVisible = function(){ var custWindow = this.GetCustomizationWindow(); return custWindow != null && custWindow.IsVisible();}
ASPxClientGridView.prototype.ShowCustomizationWindow = function(showAtElement){ var custWindow = this.GetCustomizationWindow(); if(!_aspxIsExists(showAtElement)) showAtElement = this.GetMainTable(); custWindow.ShowAtElement(showAtElement);}
ASPxClientGridView.prototype.HideCustomizationWindow = function(){ var custWindow = this.GetCustomizationWindow(); if(custWindow != null) custWindow.Hide();}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.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);}
ASPxClientGridView.prototype.UnselectRowsByKey = function(keys){ this.SelectRowsByKey(keys, false);}
ASPxClientGridView.prototype.UnselectRows = function(visibleIndices){ this.SelectRows(visibleIndices, false);}
ASPxClientGridView.prototype.SelectRowOnPage = function(visibleIndex, selected){ if(!_aspxIsExists(selected)) selected = true; this.SelectRow(selected);}
ASPxClientGridView.prototype.UnselectRowOnPage = function(visibleIndex){ this.SelectRowOnPage(visibleIndex, false);}
ASPxClientGridView.prototype.SelectAllRowsOnPage = function(selected){ if(!_aspxIsExists(selected)) selected = true; this._selectAllRowsOnPage(selected);}
ASPxClientGridView.prototype.UnselectAllRowsOnPage = function(){ this._selectAllRowsOnPage(false);}
ASPxClientGridView.prototype.GetSelectedRowCount = function() { return this._getSelectedRowCount();}
ASPxClientGridView.prototype.GetSelectedFieldValues = function(fieldNames, onCallBack) { this.gridFuncCallBack("SELFIELDVALUES|" + fieldNames, onCallBack);}
ASPxClientGridView.prototype.GetRowValues = function(visibleIndex, fieldNames, onCallBack) { this.gridFuncCallBack("ROWVALUES|" + visibleIndex + "|" + fieldNames, onCallBack);}
ASPxClientGridView.prototype.GetPageRowValues = function(fieldNames, onCallBack) { this.gridFuncCallBack("PAGEROWVALUES|" + fieldNames, onCallBack);}
ASPxClientGridView.prototype.GetColumnsCount = function() { return this._getColumnsCount();}
ASPxClientGridView.prototype.GetColumn = function(index) { return this._getColumn(index);}
ASPxClientGridView.prototype.GetColumnById = function(id) { return this._getColumnById(id);}
ASPxClientGridView.prototype.GetColumnByField = function(fieldName) { return this._getColumnByField(fieldName);}
ASPxClientGridView.prototype.GetEditor = function(column) { var columnObject = this._getColumnObjectByArg(column); return columnObject != null ? this.GetEditorByColumnIndex(columnObject.index) : null;}
ASPxClientGridView.prototype.GetEditValue = function(column) { var editor = this.GetEditor(column); return editor != null ? editor.GetValue() : null;}
ASPxClientGridView.prototype.SetEditValue = function(column, value) { var editor = this.GetEditor(column); if(editor != null) { editor.SetValue(value);}
}
ASPxClientGridView.prototype.RaiseSelectionChanged = function() { if(!this.SelectionChanged.IsEmpty()){ var args = new ASPxClientEventArgs(); this.SelectionChanged.FireEvent(this, args);}
return false;}
ASPxClientGridView.prototype.RaiseFocusedRowChanged = function() { if(!this.FocusedRowChanged.IsEmpty()){ var args = new ASPxClientEventArgs(); this.FocusedRowChanged.FireEvent(this, args);}
return false;}
ASPxClientGridView.prototype.RaiseColumnSorting = function(column) { if(!this.ColumnSorting.IsEmpty()){ var args = new ASPxClientGridViewColumnCancelEventArgs(column); this.ColumnSorting.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseColumnGrouping = function(column) { if(!this.ColumnGrouping.IsEmpty()){ var args = new ASPxClientGridViewColumnCancelEventArgs(column); this.ColumnGrouping.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseColumnStartDragging = function(column) { if(!this.ColumnStartDragging.IsEmpty()){ var args = new ASPxClientGridViewColumnCancelEventArgs(column); this.ColumnStartDragging.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseColumnResizing = function(column) { if(!this.ColumnResizing.IsEmpty()){ var args = new ASPxClientGridViewColumnCancelEventArgs(column); this.ColumnResizing.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseRowExpanding = function(visibleIndex) { if(!this.RowExpanding.IsEmpty()){ var args = new ASPxClientGridViewRowCancelEventArgs(visibleIndex); this.RowExpanding.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseRowCollapsing = function(visibleIndex) { if(!this.RowCollapsing.IsEmpty()){ var args = new ASPxClientGridViewRowCancelEventArgs(visibleIndex); this.RowCollapsing.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseRowClick = function(visibleIndex, htmlEvent) { if(!this.RowClick.IsEmpty()){ var args = new ASPxClientGridViewRowClickEventArgs(visibleIndex, htmlEvent); this.RowClick.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.RaiseRowDblClick = function(visibleIndex, htmlEvent) { if(!this.RowDblClick.IsEmpty()){ var args = new ASPxClientGridViewRowClickEventArgs(visibleIndex, htmlEvent); this.RowDblClick.FireEvent(this, args); return args.cancel;}
return false;}
ASPxClientGridView.prototype.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;}
ASPxClientGridView.prototype.RaiseCustomizationWindowCloseUp = function() { if(!this.CustomizationWindowCloseUp.IsEmpty()){ var args = new ASPxClientEventArgs(); this.CustomizationWindowCloseUp.FireEvent(this, args);}
return false;}
ASPxClientGridView.prototype.RaiseBeginCallback = function(command){ if(!this.BeginCallback.IsEmpty()){ var args = new ASPxClientCallbackEventArgs(command); this.BeginCallback.FireEvent(this, args);}
}
ASPxClientGridView.prototype.RaiseEndCallback = function(){ if(!this.EndCallback.IsEmpty()){ var args = new ASPxClientEventArgs(); this.EndCallback.FireEvent(this, args);}
}