class_docstr: Extends QTableWidget with some useful functions for automatic data handling
  and copy / export context menu. Can automatically format and display a variety
  of data types (see :func:`setData() <pyqtgraph.TableWidget.setData>` for more
  information.
docstr: Set the mode used to sort *column*.
  
  ============== ========================================================
  **Sort Modes**
  value          Compares item.value if available; falls back to text
                 comparison.
  text           Compares item.text()
  index          Compares by the order in which items were inserted.
  ============== ========================================================
  
  Added in version 0.9.9
docstr_tok: ["Set","the","mode","used","to","sort","*","column","*",".","==============","========================================================","*","*","Sort","Modes","*","*","value","Compares","item.value","if","available",";","falls","back","to","text","comparison",".","text","Compares","item.text","(",")","index","Compares","by","the","order","in","which","items","were","inserted",".","==============","========================================================","Added","in","version","0.9.9"]
code: def setSortMode(self, column, mode):
      """
      Set the mode used to sort *column*.
  
      ============== ========================================================
      **Sort Modes**
      value          Compares item.value if available; falls back to text
                     comparison.
      text           Compares item.text()
      index          Compares by the order in which items were inserted.
      ============== ========================================================
  
      Added in version 0.9.9
      """
      for r in range(self.rowCount()):
          item = self.item(r, column)
          if hasattr(item, "setSortMode"):
              item.setSortMode(mode)
      self.sortModes[column] = mode
  
imports: import numpy
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 14 for calling the TableWidget obj's underlying member method code with example usage: obj.setSortMode(column, mode) without return types