By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,465 Members | 1,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,465 IT Pros & Developers. It's quick & easy.

Issue with propertygrid.

P: n/a
I need to make my propertygrid readonly in some cases which obviously i
am not able to do.
So what i do is i make my propertygrid.enable = false and then tried to
make its scrollbar.enable = true through reflection but it does not
happen as their is no set in enable property. What i really need to
know is the name of fiels that this enable property accesses so that i
can change its value through reflection. OR any other way to make my
propertygrid readonly without making wrapper classes in which there is
no set, kind of the things.

Thanx in advance.

Mar 31 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Mean you this?:

using System.ComponentModel;

private int m_intPrp = 0;

[ Description("Property"), Category("Standard")]
public int Property
{
get { return m_intPrp; }
set { m_intPrp= value; }
}

Or leaf the "set" methode!

Greetings Raph

Mar 31 '06 #2

P: n/a
I said
"OR any other way to make my
propertygrid readonly without making wrapper classes in which there is
no set, kind of the things. "

which means that some other solution in which i dont have to remove set
clause from my property as in some cases i have to set values in that
property.

Mar 31 '06 #3

P: n/a
IIRC you can add [ReadOnly] as a property attribute to do this.

Mar 31 '06 #4

P: n/a
How that going to work. if u can plz mail me any code snippet that is
implementing this property.

Mar 31 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.