Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Security Setup seems to overwrite ReadOnly -propert
Message
 
À
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:
00891190
Vues:
24
Pertti,

>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.

You should be able to iterate through all the controls by doing something like this:
public void GetObjects(Control Container) 
{
	// *** Drill through each control on the form
	foreach( Control control in Container.Controls)
	{
		// ** Recursively call down into any containers
		if (control.Controls.Count > 0)
			GetObjects(control);

		// ** Do your processing here!
	}
}
>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?

That's right...I talked about this again with Rick and he prefers not to use grids for data entry on the web.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform