PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Read only in a colum in a Table control
Read only in a colum in a Table control
Débuté par Victoria, 20 juil. 2007 16:05 - 1 réponse
Posté le 20 juillet 2007 - 16:05
Hi all,
I have a Table control with 5 columns. Four of them are "read only" and the last one is a check box which is "edit/enabled". What I need is to change this mode to "read only" for this column under some particular conditions. But in some rows, not in all of them. I've try to do it but I could'nt found a property for the columns in a Table control to do this. Some one has any idea about how to do it or if is really possible to do this? Thanks in advance.
Regards!
Victoria
Posté le 21 juillet 2007 - 20:18
Hello Victoria,
If your goal is to put columns of some rows as read-only and other as editables, you can't do it thru properties. A column is either read-only or editable for all rows of the table.
The way to process is for example to put another invisible column in the table that will hold the 'editable' state for the column of each row. In the 'Entry' code for the column, you must then check the value of the invisible column and get out if the column is read-only. This 'state flag' is not absolutely mandatory, you can check the cell color if the read-only and editable cells are different colors. The secret is in the 'Entry code' for the column field.

Christian