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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top