Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Security Setup seems to overwrite ReadOnly -propert
Message
De
30/03/2004 12:45:09
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00890596
Message ID:
00890890
Vues:
21
Kevin:

The way I do it now is have a button that shows EDIT when the "readonly" form loads. If it is clicked, I iterate through all form controls and set the ReadOnly -property to .F. (except for possibly flagged controls which will always stay readonly. At that point the button text changes to "Save". If you click it again, it runs the save code, turns everything back to ReadOnly=.T. and changes the button text back to Edit. I have it working quite well, exept for the ReadOnly=.T. problem with security controls.

I can see that it would be a problem with controls where the user has ReadOnly -access -- I would then need to look up the security level for the current user before turning ReadOnly on.

Another option I tried is use Enabled instead of ReadOnly. The problem with this (as far as I can tell) is that with Web apps Enabled makes it difficult if not impossible to iterate through the controls that are currently disabled, because they do not show up in the Request.Form.AllKeys -array, which I use to do the looping. If there is another way to loop through all controls on a web form regardless of their Enabled -status, I would be quite happy to use that with Enabled on/off (I tried to figure it out but could not make it happen for some reason...). I guess this would also avoid the whole issue on what is readonly and what is not.

Another unrelated question: Grid security applies for the whole grid, right? There is no easy way to set security at the grid column level, is there?

Thanks for your help!

Pertti

>>This truly appears to be a bonified problem, which would stop one from using an Edit/Save -toggle.
>
>Rick and I discussed this last night, and although we COULD make it work this way, is it "the right way"? How would the controls know whether to leave itself Read-Only or not?
>
>Regards,
Pertti Karjalainen
Product Manager
Northern Lights Software
Fairfax, CA USA
www.northernlightssoftware.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform