Editing arrays in PropertyGrid

G

Guest

Is there any way to prevent a PropertyGrid from allowing the user to expand
the elements of an array? For properties that are of type ArrayList or
CollectionBase a PropertyGrid only allows the items to be edited in the
Collection Editor (by clicking the button with the ellipses). But, for
properties of type Array a PropertyGrid also allows array elements to be
edited directly by expanding the array within the PropertyGrid. The problem
is that (as far as I know) no events are raised when the value of an element
is changed directly in the PropertyGrid, but I need to know whenever an array
(or any of its elements) change so that I can update my application.

Thanks for any help.
Lance
 
G

Gary Chang[MSFT]

Hi Lance,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jeffrey Tan[MSFT]

Hi Lance,

Thanks for your posting!

The expanded behavior for Array type property is achieved through
ExpandableObjectConverter class, and Array class is defaultly assiciated
with this class, so it will default expand itself in PropertyGrid.

Based on my understanding, you want to be notified when a child item of the
array is modified in PropertyGrid.

Currently, we may use propertygrid's PropertyValueChanged event to
intercept the property modify operation. Hope this helps.
========================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

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

Top