473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Data Source property

I am inheriting an existing windows control.
I am adding a datasource and datamemberfield properties.
However, the existing control already has "datasource" and "datamember"
properties so I rename my properties to "MyDataSource" and
"MyDataMember" so as not to confuse with the originals (which are still
required and nothing to do with this addition)

I wish to use the "Editor" attributes to allow assignment of the values
to these properties at design time, but the DataMemberField editor
always takes its datasource from the DataSource property. Is there
anyway to reassign the editor to use the datasource indicated in
"MyDataSource"?

My Code:

<Category("Data"), _
Editor("System.Windows.Forms.Design.DataMemberList Editor," & _
"System.Design", GetType(System.Drawing.Design.UITypeEditor))>
_
Public Property MyDataMember() As String
Get
Return mListField
End Get
Set(ByVal Value As String)
mListField = Value

End Set
End Property

<Category("Data"), _
RefreshProperties(RefreshProperties.Repaint), _
TypeConverter("System.Windows.Forms.Design.DataSou rceConverter,"
& _
"System.Design")> _
Public Property MyDataSource() As Object
Get
Return mListSource

End Get
Set(ByVal Value As Object)
mListSource = Value

End Set
End Property
--
Chris Petchey
Nov 21 '05 #1
0 814

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

Similar topics

2
by: Jan van Veldhuizen | last post by:
I try to use the Server Data on Insert property to return a column value swhich is set in a trigger. But it does not work. Why not? What am I doing wrong? (BTW I'm using Oracle version 10) My...
1
by: Not Me | last post by:
Hi, Very new to this, so apologies if I go completely wrong :) I'm wanting to create a link to a separate page based on data in a datagrid. I can get it working almost how I want it using a...
1
by: dbuchanan | last post by:
Hello, A section in Data Sources window is mystifying to me. In the case of my code the Data Sources window shows my references to the data access layer. First here is what I see in my Data...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
1
by: yeltsin27 | last post by:
I can see how to use a cookie, control property, form input value, profile, query string or session value as a parameter to a SQL Data Source. However I would like to use a property that is...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
0
by: aarnan | last post by:
I have two SqlDataSources that use two different stored procedures that take parameters to populate two controls, one dependant on an element of the other. The first data source,...
4
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi All, I have an application that fetch data thru a store proc and display in a datagrid, but after successful execution of proc the data grid is not visible.Please go thru the following code...
0
by: diff | last post by:
I am having trouble preventing a bound source from updating using event-driven validation. There is a very nice article on MSDN explaining this;...
12
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.