Set InnerText to be locked and non-editable

59 views Asked by At

I want to make the Inner Text to be read only for an interface program. Nothing would happen if the user change a value but it is confusing for the user that they can change the value but it would not be imported. The best would be to lock the field (read only) that the user can see the values but can not change it.

if (theXmlDocument.SelectSingleNode("Data/Tool/Characteristic/Diameter") != null)
           Services.DoCommand("tool", "EDIT TOOL '" + itsToolName + "' DIAMETER '" + (Convert.ToDouble(theXmlDocument.SelectSingleNode("Data/Tool/Characteristic/Diameter").InnerText, System.Globalization.NumberFormatInfo.InvariantInfo) * itsMetricToInchFactor).ToString().Replace(".", ",") + "'");
// How to make field to be locked and not editable?

How can I make the text to be locked or make the field to be not editable?

0

There are 0 answers