Security and hiding fields.

Security and hiding fields.

Old forum URL: forums.lhotka.net/forums/t/5645.aspx


tkd posted on Tuesday, October 21, 2008

With the security you can disable fields if a user has readonly permission on the field. And you can show a blank field if ther user has no security to view the task. Given that you are already manipulating the UI components, would it be possible to have an option to hide fields completely, i.e. set the Visible property to false?

RockfordLhotka replied on Wednesday, October 22, 2008

Probably not in Windows Forms. If a control isn't visible, it isn't bindable. You could probably set its size to 0,0 and get the same effect, without breaking data binding. You can make a copy of the ReadWriteAuthorization control and alter it to meet your needs. As a general rule Windows Forms is in maintenance mode for me now - it is not my intent to add or enhance features.

In WPF the Authorizer control does have the option of changing the Visibility property of a control to either Hidden or Collapsed. Either way the control disappears, the setting controls how the layout is affected.

Right now in WPF and Silverlight the PropertyStatus control just disables the control - more like in Windows Forms. It is probably a good idea to enhance it to alter Visibility, and may be an idea for 3.6.1.

Copyright (c) Marimer LLC