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)
{
foreach( Control control in Container.Controls)
{
if (control.Controls.Count > 0)
GetObjects(control);
}
}
>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