How to change the columns of a KeyTable on a per row basis?

How to change the columns of a KeyTable on a per row basis?

oeschelpoeschelp Posts: 2Questions: 1Answers: 0

I've been trying to figure out for a while now on how to change the columns that can be selected on a per row basis. Pretty much, there are cells that the users can update. They navigate to these cells using the KeyTable functionality.

However, when they check a box at the end of the row, that row is no longer updateable. So I want to be able to prevent them from even being able to navigate to that cell once that happens.

So, in my example, the users check a box and it 'finalizes' that row.

You can see that, because the row turns black. But, those two cells are still able to be navigated to. How could I remove those rows from the KeyTable only. I still need columns 13 and 14 to be able to be accessed on every row but that row.

That row "TR" has a class of "finalized" which is what turns it black. Can I use this row class to prevent the KeyTable form being able to access it.

keys: {
    columns: [13, 14],
    tabIndex: 1
  }

Currently, I specify the keys in the datatable as seen above.

Most Respectully
Jordan

Answers

  • kthorngrenkthorngren Posts: 21,302Questions: 26Answers: 4,947

    According to the keys.columns you can use any of the options available for the column-selector. Haven't tried it but it sounds like you should be able to use classes to enable or disable as needed.

    Kevin

  • oeschelpoeschelp Posts: 2Questions: 1Answers: 0

    Kevin

    I read that part but it makes it seem like I can select a specific column all together based on certain attributes. The example they used was not last child which would make all the columns editable minus the one furthest to the right.

    But it still doesn't show me how I can do this on a per row basis.

    Thanks for the response though. I'll keep looking/trying things. Maybe I can figure out how to manipulate this to work.

    Jordan

  • kthorngrenkthorngren Posts: 21,302Questions: 26Answers: 4,947

    Maybe add a class to allow the two columns then remove the class when you apply the finalized class. Then reapply the calls when you remove the finalized class. Not sure since I haven't tried it.

    Kevin

This discussion has been closed.