Thank you for writing.
Although sometimes unavoidable we strive to minimize as much as possible the use of code like Parent.Parent and Children(0).Children(2). This makes the code really unreadable and also makes it more difficult to maintain. Here are several options you have for retrieving the property value from within the button click event handler, depending on the type of the property:
1. If the property is a string you can directly access it through Me.Value, where Me would be the CustomTextBoxEditor. Me.Value returns a string boxed in an object so you will have to cast it.
2. Me.TextBoxEditorElement.Text would give you the text displayed in the editor text box.
3. If the email property is some complex object you can retrieve it like this:
PropertyGridItemElement = TryCast(
PropertyGridItem = TryCast(itemElement.Data, PropertyGridItem)
Email = TryCast(item.Value, Email)
I hope this will help. Do not hesitate to contact us with further questions.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.