Preventing controls enable property from changing
Hi Everyone,
I m implementing control based security in my application. where i m saving controlname (per form) in database, which are to be restricted.
So far I have implemented the security and restricted control get disabled.Now what i want to do is that i have to prevent that for those controls the "control.Enable" property should not change. how can i restrict that.
I have achieved the functionality by canceling enable=true property in "Invalidated" event of the control. but this is not some generic way. I have to map this event for all controls in all forms :(.
What i really want is that as all my froms are derived from same parent which implements the security. so the parent should some how restrict enable property from changing.
So,HOW CAN I PREVENT CONTROL enable property from changing in their parent class?
Thanks & Regards,
Haroon.