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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box question

Status
Not open for further replies.

newssis

MIS
Dec 18, 2008
13
US
Hi ,

I have text box in the C# application form.

I would like to have it gray out for everything other than new entry.

How can i set up properties like that?

Please help?

thanks
Pat
 
What exactly to you mean by "grayed out"? Do you want the textbox disabled? The background gray? The font of the text in the textbox to be gray?

If you choose to battle wits with the witless be prepared to lose.

[cheers]
 
Hi,

Sorry for confusion.

I would like to knwo that how can i disable for user to modify it. In new entry they can entre the data. But once data enter in to htat vendor number filed or text box then they cannot change it again. not even in modify option. But i would still like to see data in that box on select.

Thanks
Pat
 
Once the data has been entered, validated and saved, set the TextBox Enabled property to false.
Code:
myTextBox.enabled = false;
 
but it will be user application. How i know that data has been saved or not

i keep want user to see data but cannot change it. Only new entry needs to have textbox enabled.

thanks
Pat
 
You need to look at the code, and decide where to enable/disable the text box.

Are you using Visual Studio? Step-through the code as it works now, and see when the text box is initialised, and when it is validated, and when the record is saved.

From there you can begin to decide where to add the code to enable/disable the text box.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top