How do I disable a PropertyGrid item at runtime

  • Thread starter Thread starter mudassirahmed368
  • Start date Start date
M

mudassirahmed368

How do I disable a PropertyGrid item at runtime. i am using this on
windows form.and want only few items to be editable to the user.other
items should be disabled
 
Hi,

Most likely, you'll have to implement the ICustomTypeDescriptor interface,
and in its GetProperties method, return a collection of PropertyDescriptor
objects in which for all the properties that should be disabled in the
property grid, the ReadOnly property would be set to "true".
 
Back
Top