Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make bound form programmatically read only

Status
Not open for further replies.

pwomack

Technical User
Apr 16, 2005
121
US
I have a Windows form bound to a SQL table. I don't use a datagridview, just individual fields. How can I programmatically make the form read only?

Thanks.
 
One way I can think of is to put all of your bound controls in a sub-container such as a panel or a group box. Then you can set the .Enabled property of the sub-container to False, and all of the controls in it will be disabled as well.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top