Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simplest way to turn FormView into the ReadOnly mode
Message
De
05/06/2008 16:21:19
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01321954
Message ID:
01321973
Vues:
23
>>>Hi everybody,
>>>
>>>Just wondering what is the simplest way to turn the FormView with EditItemTemplate into the ReadOnly mode? I tried Enabled = 'false', but having everything (including labels) disabled doesn't look good.
>>>
>>>Any other ideas?
>>>
>>>My Form uses UserControls, so the alternative method would be to disable controls inside UserControls, but I'm looking for a simpler solution.
>>>
>>>Thanks in advance.
>>
>>We just disable "Save" functionality for the page.
>
>I removed the Undo/Save buttons, but I want to make texboxes, comboboxes to be ReadOnly.

But if the user can't save, aren't all user inputs readonly? The only other way would be to iterate over all controls and set databound controls to readonly.

PS, your user controls should have public properties for things like ReadOnly. The user control can then manipulate its contained controls as required. I only mention this because I'm dealing with some usercontols where the developers manipulated contained controls in form code, wreaking encapsulation.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform