473,406 Members | 2,343 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,406 software developers and data experts.

bind control to BindingSource property

Hello,

I want to enable/disable some Textboxes by a property of a derived
BindingSource-class.
This is what i got so far:
----
class myBindingSource : BindingSource
{
public object mxtest = false;
public EventHandler testChanged;

public object test
{
get
{
return mxtest;
}
set
{
if (test != value)
{
mxtest = Convert.ToBoolean(value);
OntestChanged();
}
}
}
private void OntestChanged()
{
if (testChanged != null)
{
testChanged(this, new EventArgs());
}
}
}

----
What I want to do is bind the textboxes like that:
myTextBox.DataBindings.Add("Enabled", myBindungSourceInstance, "test");

the error "Cannot bind to property or column test on DataSource.
Parametername: dataMember" comes up if I do so.

What is wrong?

I hope someone can help me!

Thank you!
Regards,
Uwe Braunholz

Mar 2 '06 #1
0 1536

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

Similar topics

3
by: AH | last post by:
Hi all, I noticed this strange behavior; I created a new control (example inherits from textbox) and add a new property, then I bind this new property to a field in my dataTable in a dataSet....
1
by: Dave | last post by:
Hello all. I have a DataGridView control which I have populated by binding it to an ArrayList, which contains about 150 instances of a structure. The downside, is that I don't want to display...
2
by: Sean | last post by:
How does one bind a SortedList to anything. If it cant be done why would anyone ever even use a sortedlist? We are currently (via business objects that use interfaces etc) binding gridviews to...
1
by: David Veeneman | last post by:
How do I get the data bindings for a control that is bound at design time? I'm binding a DataGridView control to a data source at design time, using a BindingSource control. I set the grid's...
0
by: Rick Shaw | last post by:
Hi, I have datagridview with unbounded checkboxes and data bounded textbox in one tab of a tab control. In another tab of the same tab control I have a text box. Both the datagridview and the text...
3
by: --== Alain ==-- | last post by:
Hi, I have a control which has a collection property. when an item of the collection property will be added, removed, and so on, i would like to refresh the control itself. Usually for that i...
7
by: Mike | last post by:
i have a small difficulties with BindingSource and dataGridView bind db has properly opened and bind doesn't works. Unfortunately I didn't find any good example how to connect MS Access with...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, I used the Data Sources window to drop a custom object onto the designer surface. It created a BindingSource and BindingNavigator as a result. When I open the Properties window...
3
by: Andrus | last post by:
Winforms appl creates customer edit form containing textboxes using Customer dataSource = Northwind.Customers.GetByName("Airbus"); MaskedTextBox tb = new MaskedTextBox(); Binding binding = new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.