Is this a Bug in PropertyGrid of Winforms

Mohd Ahmed 0 Reputation points
2023-06-23T14:35:38.98+00:00

Hello all,

I am using PropertyGrid to display some data. I have a condition to make a particular property readonly based on the value of another property (both properties are displayed on PropertyGrid).

I am doing this with the help of PropertyDescriptor and it works perfectly fine when PropertyGrid is loaded with PropertyDescriptor's Readonly = false (cell is enabled) and then after changing the value of another property to make PropertyDescriptor's Readonly = true cell gets disabled. See snapshot below :

User's image

However same behavior is not seen when PropertyGrid is loaded with PropertyDescriptor's Readonly = true. In this case property does not gets enabled after changing PropertyDescriptor's Readonly = false. It always remains disabled (non editable) no matter what.

See snapshot below :

User's image

Let me know if more info is required.

Regards

Ahmed

Developer technologies | Windows Forms
Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.