Editor attribute on IListSource derived class?

  • Thread starter Thread starter Eric J. Smith
  • Start date Start date
E

Eric J. Smith

I am attempting to add an Editor attribute to an IListSource derived class
(specifically it's a typed DataSet). It appears that IListSource over rules
any Editor attribute. Is there any way that I can get my Editor attribute
to be used?

Any help is greatly appreciated!

Eric J. Smith
 
Hi Eric,

Thanks for posting in this group.
Which property of DataSet you want to apply Editor attribute?
Which Editor you want to apply on the property? Arrayeditor or something
else?
If you apply this attribute, what error do you get?
Please show me more detailed information, thanks

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.
 
Jeffrey,

I am attempting to apply the attribute to the DataSet itself. What I am
attempting to do is have the typed DataSet be a property that shows up in
the PropertyGrid control and in the property grid be able to browse to an
XML file to load that typed DataSet from. I know how to create the editor
for what I want to do, but the problem is that my Editor attribute is just
completely ignored. From what I can tell, since DataSet implement
IListSource, the property grid is checking for this first and then using the
editor for it, but what I want is to override this bahavior in this case and
force it to use my Editor.

Thanks,
Eric J. Smith
 
Hi Eric,

Thanks for your feedback.
I have partially understand your problem. Your component contains a dataset
and exposes it through a property.
You want to use a browser dialog to select a xml file then load its content
into the dataset.
While the dataset has implemented IListSource interface, so it has it
default design time editor. You have created a customized editor for
dataset, but you do not know how to give up the dataset's default editor
and use the new editor you create?

If I misunderstand you, please feel free to tell me.

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.
 
Hi Eric,

If you implemented a editor(Inherited from
System.Drawing.Design.UITypeEditor), and apply this through EditorAttribute
on the component's property(which expose the dataset). I think it will
override the default editor style.
Have you tried this?

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.
 
Jeffrey,

Yes, I have tried this. This is exactly what I'm asking you. When I apply
the EditorAttribute to an IListSource derived object, the EditorAttribute
seems to be ignored. I simply need to know if there is any way (even a
hack) to get around this. I really want to be able to use a DataSet derived
class as a property in my property grid and, in my context, the little drop
down editor that IListSource seems to invoke is useless. I need to be able
to specify a custom UITypeEditor derived EditorAttribute.

Someone please help! :-)

Thanks,
Eric J. Smith
 
Hi Eric,

I will do some research for this. And I will reply you ASAP.
Thanks for your understanding.

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.
 
Hi Eric,

The EditorAttribute should take effect on dataset property, I think there
may be something wrong with your code.
Can you show me how your code implement this?(Both your customized
UITypeEditor and how you applied on dataset property)

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.
 
Hi Eric,

I have received your code, I will do some research into.
Thanks for your understanding.

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.
 
Hi Eric,

I am strange to find that I also can not replace the dataset's default type
editor, I will try to find the reason.
Thanks for your understanding.

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.
 
Back
Top