Make a field readonly at runtime

hi,

how can i make a field readonly at runtime?

i tried to do it from epiview notification, but not affecting.

the below code making it readonly on load, but not on runtime.

edvOrderHed.dataView.Table.Columns[“OrderHeld”].ExtendedProperties[“ReadOnly”] = true;

There are issues you will face happening behind the scenes that you may not be able to overcome. You can try resetting readonly or enabled after edit of some fields.

If the goal is to stop it from being edited then you can try extended properties, but I usually resort to a security group and a bpm to block any users not in the group from changing the field.

Check out row rules. You can set the condition at something like FieldName == FieldName if you want the action to always occur. I’ve had to use the rule action of Disabled instead of ReadOnly to make it stick.

Joe

thanks for the replies.

yes, i know about the extended properties, but i need to do this at runtime based one the conditions.

and row rules, can we set multiple conditions?
like
a == true and b = false then enable,
a == true and b == true disable?
else default.

Yes you can setup a Custom Condition and then put your logic in there.

thanks, i will give a try and update.