Home All Groups Group Topic Archive Search About

Non-Editable Property not read-only property

Author
14 Jan 2007 1:34 PM
Behzad
hi all,

thanks for ur concern,

what i'am looking for is a way to not allow the user editing the value
of the property - let's say in a propertygrid -.Being read-only does
not fit this need because i want to be able to assign value to the
property but while showing the property to user, he/she should only be
able to see the value not edit it.

Is there any way to do this?

Thanks a lot.
Behzad

Author
15 Jan 2007 12:34 PM
VisualHint
Hello Behzad,

if you attach a [ReadOnly(true)] to your property, it will be readonly
in the grid, and still a settable property in your code.

Best regards,

Nicolas Cadilhac @ VisualHint (http://www.visualhint.com)
Home of Smart PropertyGrid for .Net and MFC
Microsoft PropertyGrid Resource List -
http://www.propertygridresourcelist.com

Behzad wrote:
Show quote
> hi all,
>
> thanks for ur concern,
>
> what i'am looking for is a way to not allow the user editing the value
> of the property - let's say in a propertygrid -.Being read-only does
> not fit this need because i want to be able to assign value to the
> property but while showing the property to user, he/she should only be
> able to see the value not edit it.
>
> Is there any way to do this?
>
> Thanks a lot.
> Behzad

AddThis Social Bookmark Button