I want some properties to be read-only. I am okay with the disable style on the textbox, that's standard. But why dimme the label?
Whats the best way to make the label normal again?
1 Answer, 1 is accepted
answered on 25 Jan 2023, 07:52 AM
The built-in label is a part of the form field. If you inspect the rendering, you may notice that both the label and the input are nested in a <div class="k-form-field">.
By design, when the form field is disabled, "k-disabled" class is added to that div. In this case, its children - the label and the input - both have certain styling that indicates to the user this field is not editable.
You have two options to customize this behavior:
If you use the Enabled="false" property of the form field, the label will be disabled by default and you may apply some CSS to the label to style it as needed.