Question Read-only PropertyGrid

Eric101

New member
Joined
Dec 11, 2008
Messages
4
Programming Experience
Beginner
Hi,

I've been looking around for ways to make the PropertyGrid read only. I
found a sample here that's closely match to what I need but there's an issue
with this sample and I couldn't figure it out Dot Net Facts: How to: Set the PropertyGrid as Read-Only

I'm using more than one PropertyGrid and when I set one PropertyGrid
ReadOnly property to True, all of the PropertyGrids become readonly.

Can anybody tell me what went wrong? Or could you tell me how to have the
PropertyGrid read-only in other way.

Thanks so much.
 
Can you not just clone the object that you put in the grid, then it doesnt matter if the user changes it?

Or provide a whole bunch of read-only properties and make all the real properties not browsable?
 
Cloning the object won't be a good idea. It's going to double the size of memory and it has immediate impact on the overall performance. I need to show the object readonly and allow user to browse the property.

Modifying the business objects won't be an option for me. It should be done on the presentation layer.
 
Last edited:
Back
Top