Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to set column in table not editable

Can I make one or more columns in an UITable not editable but still visible, while all other Columns remain editable?

The setEditable(false) method of UITable works for the whole table, not for just a single column?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The UITable is only one element. If you use an UIEditor the column should also be disabled. The model will handle everything:

dataBook.getRowDefinition().getColumnDefinition("COLUMN_NAME").setReadOnly(true);

The model notifies all editors and cells in a table. So above method call is enough to change the model and all UI controls will be correct automatically.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading