Menu

Moving columns doesn't move editing property

Help
Clood
2007-05-18
2013-04-08
  • Clood

    Clood - 2007-05-18

    Hi,

    first of all: very congratulation for tikeswing!
    I'm using it on a big project and it works very well!
    I'm using YTable and I found a bug:
    if you have one column editable and you move this column to another position, it becames not editable!
    It seems like the fixed position is editable (not the column).
    I think the problem is:

        public boolean isCellEditable(int row, int col) {
            // the table must be editable before any cell is editable...
            if (!this.isEditable()) {
                return false;
            }
            // checking editable state for specific cell from editableCells
    >>>>>>>>>>>>>>>>>>>>>
    In the bottom you must not use col but convertColumnIndexToModel(col)
    <<<<<<<<<<<<<<<<<<<<<
            Boolean editable = (Boolean) this.getValue(row, col, editableCells);
            if (editable == null) {
                // no editable state specified in editableCells, using YColumn editable...
                return columns[col].isEditable();
            } else {
                    return editable.booleanValue();    
            }
        }

    It's correct???

    Thank you

    Clood

     
    • Tomi Tuomainen

      Tomi Tuomainen - 2007-05-20

      Yes, you are right. If not done already, you may add the following line in YTable source code:

      col = convertColumnIndexToModel(col);

      Anyway, this will be fixed in the next release. Thank you for this bug report.

      Tomi

       

Log in to post a comment.