restrict move across columns. move only within column. /*accept: function (sourceItemHandleScope, destSortableScope) {
return sourceItemHandleScope.itemScope.sortableScope.$id === destSortableScope.$id;
},
354979
function (event) {
      event.source.itemScope.modelValue.status = event.dest.sortableScope.$parent.column.name;
    }
981836
def SetNewOrder( self, column ):
        """"""
        if column.sortOn:
            # multiple sorts for the click...
            columns = [self.columnByAttribute(attr) for attr in column.sortOn]
            diff = [(a, b) for a, b in zip(self.sortOrder, columns)
                    if b is not a[1]]
            if not diff:
                self.sortOrder[0] = (not self.sortOrder[0][0], column)
            else:
                self.sortOrder = [
                    (c.defaultOrder, c) for c in columns
                ] + [(a, b) for (a, b) in self.sortOrder if b not in columns]
            return False
        else:
            if column is self.sortOrder[0][1]:
                # reverse current major order
                self.sortOrder[0] = (not self.sortOrder[0][0], column)
            else:
                self.sortOrder = [(column.defaultOrder, column)] + [
                    (a, b)
                    for (a, b) in self.sortOrder if b is not column
                ]
            return True
1309933
function ( e )
	{
		var that = this;

		$(document).off( 'mousemove.ColReorder mouseup.ColReorder' );

		if ( this.dom.drag !== null )
		{
			/* Remove the guide elements */
			this.dom.drag.remove();
			this.dom.pointer.remove();
			this.dom.drag = null;
			this.dom.pointer = null;

			/* Actually do the reorder */
			this.s.dt.oInstance.fnColReorder( this.s.mouse.fromIndex, this.s.mouse.toIndex );
			this._fnSetColumnIndexes();

			/* When scrolling we need to recalculate the column sizes to allow for the shift */
			if ( this.s.dt.oScroll.sX !== "" || this.s.dt.oScroll.sY !== "" )
			{
				this.s.dt.oInstance.fnAdjustColumnSizing( false );
			}

			/* Save the state */
			this.s.dt.oInstance.oApi._fnSaveState( this.s.dt );

			if ( this.s.reorderCallback !== null )
			{
				this.s.reorderCallback.call( this );
			}
		}
	}
770506
def lockToColumn(self, index):
        
        self._lockColumn = index
        
        if index is None:
            self.__destroyLockedView()
            return
        else:
            if not self._lockedView:
                view = QtGui.QTreeView(self.parent())
                view.setModel(self.model())
                view.setSelectionModel(self.selectionModel())
                view.setItemDelegate(self.itemDelegate())
                view.setFrameShape(view.NoFrame)
                view.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
                view.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
                view.setRootIsDecorated(self.rootIsDecorated())
                view.setUniformRowHeights(True)
                view.setFocusProxy(self)
                view.header().setFocusProxy(self.header())
                view.setStyleSheet(self.styleSheet())
                view.setAutoScroll(False)
                view.setSortingEnabled(self.isSortingEnabled())
                view.setPalette(self.palette())
                view.move(self.x(), self.y())
                
                self.setAutoScroll(False)
                self.setUniformRowHeights(True)
                
                view.collapsed.connect(self.collapse)
                view.expanded.connect(self.expand)
                view.expanded.connect(self.__updateLockedView)
                view.collapsed.connect(self.__updateLockedView)
                
                view_head = view.header()
                for i in range(self.columnCount()):
                    view_head.setResizeMode(i, self.header().resizeMode(i))
                
                view.header().sectionResized.connect(self.__updateStandardSection)
                self.header().sectionResized.connect(self.__updateLockedSection)
                
                vbar = view.verticalScrollBar()
                self.verticalScrollBar().valueChanged.connect(vbar.setValue)
                
                self._lockedView = view
            
            self.__updateLockedView()
667404
function orderBy($column, $dir = null) {
		if (null !== $dir && '' !== $dir) {
			$dir = strtoupper($dir);
			if ($dir !== self::ASC && $dir !== self::DESC) {
				throw new RuntimeException("$dir is not a valid sorting direction.");
			}
			$column .= ' ' . $dir;
		}
		$this->orders[] = trim($column);
		return $this;
	}
48422
public boolean isSortable() {
		// First check global override which turns sorting off
		if (getSortMode() == SortMode.NONE) {
			return false;
		}

		// Otherwise, the table is sortable if at least one column is sortable.
		TableModel dataModel = getTableModel();
		final int columnCount = getColumnCount();

		for (int i = 0; i < columnCount; i++) {
			if (dataModel.isSortable(i)) {
				return true;
			}
		}

		return false;
	}
802627
function moveLeft( count ) {
    count = count || 1;
    const moveClasses = [
      CLASSES.MOVE_LEFT,
      CLASSES.MOVE_LEFT_2X,
      CLASSES.MOVE_LEFT_3X
    ];

    if ( count < 1 || count > moveClasses.length ) {
      throw new Error( 'MoveTransition: moveLeft count is out of range!' );
    }

    _baseTransition.applyClass( moveClasses[count - 1] );

    return this;
  }
929944
private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) {
        SortAndSlice sas = XreadOrderByExpression();
        if (sas == null || sas == SortAndSlice.noSort)
            return SortAndSlice.noSort;

        // Resolve columns in the ORDER BY clause.  This code modified
        // from how compileDelete resolves columns in its WHERE clause
        for (int i = 0; i < sas.exprList.size(); ++i) {
            Expression e = (Expression)sas.exprList.get(i);
            HsqlList unresolved =
                e.resolveColumnReferences(RangeVariable.emptyArray, null);

            unresolved = Expression.resolveColumnSet(rangeVariables,
                    unresolved, null);

            ExpressionColumn.checkColumnsResolved(unresolved);
            e.resolveTypes(session, null);
        }

        return sas;
    }
602158
void deleteColumn(int column) {
        if ((column >= columns) || (column < 0)) {
            throw new IndexOutOfBoundsException("getCell at illegal index : " + column);
        }
        columns--;
        boolean newReserved[] = new boolean[columns];
        Object newCells[] = new Cell[columns];
        
        for (int i = 0; i < column; i++) {
            newReserved[i] = reserved[i];
            newCells[i] = cells[i];
            if (newCells[i] != null && (i + ((Cell) newCells[i]).getColspan() > column)) {
                ((Cell) newCells[i]).setColspan(((Cell) cells[i]).getColspan() - 1);
            }
        }
        for (int i = column; i < columns; i++) {
            newReserved[i] = reserved[i + 1];
            newCells[i] = cells[i + 1];
        }
        if (cells[column] != null && ((Cell) cells[column]).getColspan() > 1) {
            newCells[column] = cells[column];
            ((Cell) newCells[column]).setColspan(((Cell) newCells[column]).getColspan() - 1);
        }
        reserved = newReserved;
        cells = newCells;
    }
196054
def drop(self, index=None, columns=None):
        
        if self._is_transposed:
            return self.transpose().drop(index=columns, columns=index).transpose()
        if index is None:
            new_data = self.data
            new_index = self.index
        else:

            def delitem(df, internal_indices=[]):
                return df.drop(index=df.index[internal_indices])

            numeric_indices = list(self.index.get_indexer_for(index))
            new_data = self.data.apply_func_to_select_indices(
                1, delitem, numeric_indices, keep_remaining=True
            )
            # We can't use self.index.drop with duplicate keys because in Pandas
            # it throws an error.
            new_index = self.index[~self.index.isin(index)]
        if columns is None:
            new_columns = self.columns
            new_dtypes = self.dtypes
        else:

            def delitem(df, internal_indices=[]):
                return df.drop(columns=df.columns[internal_indices])

            numeric_indices = list(self.columns.get_indexer_for(columns))
            new_data = new_data.apply_func_to_select_indices(
                0, delitem, numeric_indices, keep_remaining=True
            )

            new_columns = self.columns[~self.columns.isin(columns)]
            new_dtypes = self.dtypes.drop(columns)
        return self.__constructor__(new_data, new_index, new_columns, new_dtypes)
1096574
@Override
    public <T> Optional<LocalProperty<T>> translate(Function<E, Optional<T>> translator)
    {
        return translator.apply(column)
                .map(translated -> new SortingProperty<>(translated, order));
    }
647757
private void _RemoveValidator( Row item, int column )
	{
		// already clean ?
		if( m_currentEditedItem == null && m_currentEditedColumn < 0 )
			return;

		// touch the table
		if( m_callback != null )
			m_callback.onTouchCellContent( item, column );

		if( m_currentEditor != null )
			m_currentEditor.removeFromParent();

		m_currentEditor = null;
		m_currentEditedItem = null;
		m_currentEditedColumn = -1;
	}
1122429
function rollbackDragChanges() {
            if (!scope.itemScope.sortableScope.cloning) {
              placeElement.replaceWith(scope.itemScope.element);
            }
            placeHolder.remove();
            dragElement.remove();
            dragElement = null;
            dragHandled = false;
            containment.css('cursor', '');
            containment.removeClass('as-sortable-un-selectable');
          }
941997
function(columns, desc) {
    var self = this.chain()

    if (columns) {
      if (typeof desc === 'boolean') {
        if (!Array.isArray(columns)) columns = [columns]
      } else {
        columns = [].concat.apply(
          [],
          this.definition.store.utils.args(arguments)
        )
        desc = false
      }

      for (var i in columns) {
        self.addInternal('order', {
          column: self.store.toInternalAttributeName(columns[i]),
          order: desc ? 'DESC' : 'ASC'
        })
      }
    } else {
      self.clearInternal('order')
    }

    return self
  }
877177
void moveData(Session session, Table from, int colindex, int adjust) {

        Object       colvalue = null;
        ColumnSchema column   = null;

        if (adjust >= 0 && colindex != -1) {
            column   = getColumn(colindex);
            colvalue = column.getDefaultValue(session);
        }

        PersistentStore store = session.sessionData.getRowStore(this);

        try {
            RowIterator it = from.rowIterator(session);

            while (it.hasNext()) {
                Row      row  = it.getNextRow();
                Object[] o    = row.getData();
                Object[] data = getEmptyRowData();

                if (adjust == 0 && colindex != -1) {
                    colvalue = column.getDataType().convertToType(session,
                            o[colindex],
                            from.getColumn(colindex).getDataType());
                }

                ArrayUtil.copyAdjustArray(o, data, colvalue, colindex, adjust);
                systemSetIdentityColumn(session, data);
                enforceRowConstraints(session, data);

                // get object without RowAction
                Row newrow = (Row) store.getNewCachedObject(null, data);

                if (row.rowAction != null) {
                    newrow.rowAction =
                        row.rowAction.duplicate(newrow.getPos());
                }

                store.indexRow(null, newrow);
            }
            this.timeToLive = from.timeToLive;
        } catch (Throwable t) {
            store.release();

            if (t instanceof HsqlException) {
                throw (HsqlException) t;
            }

            throw new HsqlException(t, "", 0);
        }
    }
165752
def handleClick(self, item, column):
        
        if item.text(0) == 'add another item':
            new_item = self.addEntry()
            self.setCurrentItem(new_item, 1)
            self.editItem(new_item, 1)
        
        elif column == 0:
            self.takeTopLevelItem(self.indexOfTopLevelItem(item))
1000540
function getIndexOfColumn(tableStructure, column) {
  for (var i = 0; i < tableStructure.columns.length; i++) {
    if (tableStructure.columns[i] === column) {
      return i;
    }
  }
}