473,799 Members | 3,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Editor attribute on IListSource derived class?

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
Nov 15 '05 #1
10 2388

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.

Nov 15 '05 #2
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

""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
news:$6******** ******@cpmsftng xa07.phx.gbl...

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.

Nov 15 '05 #3

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.

Nov 15 '05 #4
Jeffrey,

You have it correct. Is there anything that I can do?

Eric J. Smith

""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
news:IC******** ******@cpmsftng xa07.phx.gbl...

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.

Nov 15 '05 #5

Hi Eric,

If you implemented a editor(Inherite d from
System.Drawing. Design.UITypeEd itor), 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.

Nov 15 '05 #6
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

""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
news:$O******** ******@cpmsftng xa07.phx.gbl...

Hi Eric,

If you implemented a editor(Inherite d from
System.Drawing. Design.UITypeEd itor), 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.

Nov 15 '05 #7

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.

Nov 15 '05 #8

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.

Nov 15 '05 #9

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.

Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2042
by: Gabriel Genellina | last post by:
Hi In the following code sample, I have: - a Worker class, which could have a lot of methods and attributes. In particular, it has a 'bar' attribute. This class can be modified as needed. - a Base class (old-style) which defines a default class attribute 'bar' too. I can't modify the source code of this class. Note that Workes does not inherit from Base. - a Derived class which must inherit from Base and is a wrapper around Worker: it...
0
1863
by: Dave | last post by:
Hi everyone, (I already posted this to the VS.NET IDE news group without any responses, so I'm attempting one more time in this group) The issue I'm having is occuring in the IDE of VS.NET 2003, although I'm not sure what is actually causing the problem. I can't summarize the issue, so please read on to find out more. I've created a BaseDialogEditor class that allows a developer (namely me) to create Modal editors for controls at...
3
1975
by: Tony Johansson | last post by:
Hello!! Assume we have one base class called Vehicle and two derived classes called Car and Bus. I would be able to call method getName on an object of class Car or Bus and return back the name that is set for this class. Asking getName on an object of class Vehicle is of no interest. Assume we have an attribute called name of type string. Now to my question do you think it's right to put the name attribute in each
2
5045
by: Steve James | last post by:
I am trying to mark an override method in a derived class as obsolete using the ObsoleteAttribute. The compiler, however is not picking up this attribute and is not generating a warning or an error. Sample code is below: If I put the attribute on the static method DoSomething() in the main class, a warning/error is generated by the compiler. If I put the attribute on the virtual instance method DoSomething() of
1
2920
by: Steve Teeples | last post by:
I have class that also uses a custom editor that, when compiled directly into my project, works just fine in a propertygrid. However, it was necessary to place that class into a DLL, hense the editor was also moved into the DLL and compiled. The issue I have is the the editor is now inactive. Can someone tell me why this may be? Here is the code for the property in my class that uses the editor. This code resides within the DLL. ...
2
2517
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a pointer or reference to a derived type of the base class's return type. In .NET the overridden virtual function is similar, but an actual parameter of the function can be a derived reference from the base class's reference also. This dichotomy...
0
1117
by: Simon | last post by:
Hi I have developed a custom webcontrol like a Table (A) with a rows collection property (collection derived from CollectionBase) where I put one or more custom webcontrol (B). I need to hide some public property on controls (A) & (B) when in Design Mode. For the control (A) I have create class derived from ControlDesigner, I have override the PostFilterProperties method typing inside some code for removing the properties from...
3
5476
by: Michael Chambers | last post by:
Hi there, Is there a clean way to change a property or method's attribute in a derived class without redefining the property/method itself. That is, redefining the property/method in the derived class simply to change its attribute is ugly IMO. I assume you can do this and then simply defer to the base class version but it's unwieldy so I'm wondering if there's a better way. Thanks in advance.
1
3403
by: mrstephengross | last post by:
I've got a Base class with an attribute "foo" (of type Foo), and a Derived class (derived from Base). In Derived's constructor, I try to refer to Base.foo, but python complains: AttributeError: class Base has no attribute 'foo' Any ideas? (code below) === CODE === #!/usr/bin/python
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10485
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.