setCellSelectionEnabled:
       Sets whether this table allows both a column selection and a row selection to exist simultaneously. When set, the table treats the intersection of the row and column selection models as the selected cells.-----------------------------------
setColumnSelectionAllowed:
       Sets whether the columns in this model can be selected.

解决方案 »

  1.   

    setCellSelectionEnabled 是能否选中一个cell,也就是一行和一列的交叉单元格Sets whether this table allows both a column selection and a row selection to exist simultaneouslysetColumnSelectionAllowed 是能否选中一列Sets whether the columns in this model can be selected.