473,383 Members | 1,929 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,383 software developers and data experts.

Get the bound field of a control

BD
Hi,

How can I get the name of the bound field from a control that has
binding to a BindingSource at runtime. For example:

txtID.DataBindings.Add("Text", bdgSourceTest, "ID");

txtID is a TextBox and I want to get the bound field "ID" from txtID.

[]'s
BD
Mar 5 '07 #1
2 1436
On 5 Mar, 14:32, BD wrote:
Hi,

How can I get the name of the bound field from a control that has
binding to a BindingSource at runtime. For example:

txtID.DataBindings.Add("Text", bdgSourceTest, "ID");

txtID is a TextBox and I want to get the bound field "ID" from txtID.

[]'s
BD
txtID.DataBindings[0].PropertyName;

Or what ever the ordinal of the Databinding is. It's probably worth
checking
txtID.DataBindings.Count before bundling in :)

Mar 5 '07 #2
BD
On 5 Mar 2007 08:56:32 -0800, "DeveloperX" <nn*****@operamail.com>
wrote:
>On 5 Mar, 14:32, BD wrote:
>Hi,

How can I get the name of the bound field from a control that has
binding to a BindingSource at runtime. For example:

txtID.DataBindings.Add("Text", bdgSourceTest, "ID");

txtID is a TextBox and I want to get the bound field "ID" from txtID.

[]'s
BD

txtID.DataBindings[0].PropertyName;

Or what ever the ordinal of the Databinding is. It's probably worth
checking
txtID.DataBindings.Count before bundling in :)

Problem solved thanks. Yes I will check for the Count before :)

[]'s
BD
Mar 5 '07 #3

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

Similar topics

3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
5
by: F. Barth | last post by:
Hello, I've posted this problem to one other newsgroups, and gotten some diagnostic help, but I still need a solution. The full text of the message box is: "The field is too small to accept the...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
1
by: DrFoo | last post by:
Hi, I'm trying to check for a unique value index violation on a bound field when done editing the field (before update, on exit, on lost focus, etc), and when I find a violation change the value...
4
by: vulcaned | last post by:
Hi All, Hopefully I explain this well........ In Access97 I have a form which has a tab control on it, each tab has a sub-form which is bound to its appropriate table(I'll call them 'Detail'...
6
by: BBM | last post by:
Hi, I'm having trouble getting control data binding to work. As I understand it, the simplest form of databinding requires three things: 1) A control (say a textbox) on a form or user...
4
by: bienwell | last post by:
Hi all, Data displayed on the datalist control is bound by the column name of the dataset like this : <%# DataBinder.Eval(Container.DataItem, "title")%> Could I use an element of the array...
2
by: Matt | last post by:
I have a number of TextBox controls bound to date fields in my application, and have come across a disconcerting issue: When you are entering data into the bound field, if you enter any string that...
0
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.