This topic is locked

How can I make some fields in inline edit or add disabled

2/13/2025 1:52:28 PM
ASPRunner.NET General questions
P
precisiondi author

I need to be able to set a couple of fileds to disabled when a user isn't part of a specific security group.

I have this logic on the add and edit pages which works as needed but it isn't respected for the inline edit or add:

XVar groups = Security.getUserGroups();
if (!groups["test"]) {
// Hide the "Public" field if the user is not an admin
pageObject.setDisabled("Public");
}

Thanks in advance for any ideas.

Admin 2/14/2025

We have an API for this purpose that allows to enable/disable edit fields on the fly:
https://xlinesoft.com/asprunnernet/docs/ctrl_setdisabled.htm