I'm trying to use data bindings through the control properties, and getting
nowhere at light-speed. The online help for data bindings is virtually useless
as a tutorial on the subject, and I haven't been able to locate anything
through Google.
I've set up data bindings manually, and they work just fine, but I'm just
trying to figure out how to do it through the property page for the control.
Manually (simplified), this is what I have (C# windows form app):
public class Parameters
{
private string userName;
public string UserName
{
get { return userName; }
set { userName = value; }
}
// etc.
}
public class MyForm : Form
{
private Parameters parms;
private TextBox txtUserName;
public MyForm()
{
InitializeComponent();
txtUserName.DataBindings.Add(new Binding("Text", parms, "UserName"));
}
// etc.
}
and everything works just dandy.
*However*, what I want to be able to do is to create the databinding
automatically through the property page DataBindings. For the txtUserName
control, the DataBindings Text drop down has (none), and if I type something
like parms.UserName, I get an "Invalid property value" error. I've tried
"parms.UserName", parms, "UserName", etc., and nothing works.
So, finally my question: where is some decent documentation & tutorial on how
to use the DataBindings from the property page? Anyone have any comments on
correct usage? 3 1650
Anyone have any comments on this topic?
Julie wrote: I'm trying to use data bindings through the control properties, and getting nowhere at light-speed. The online help for data bindings is virtually useless as a tutorial on the subject, and I haven't been able to locate anything through Google.
I've set up data bindings manually, and they work just fine, but I'm just trying to figure out how to do it through the property page for the control. Manually (simplified), this is what I have (C# windows form app):
public class Parameters { private string userName; public string UserName { get { return userName; } set { userName = value; } } // etc. }
public class MyForm : Form { private Parameters parms; private TextBox txtUserName;
public MyForm() { InitializeComponent(); txtUserName.DataBindings.Add(new Binding("Text", parms, "UserName")); } // etc. }
and everything works just dandy.
*However*, what I want to be able to do is to create the databinding automatically through the property page DataBindings. For the txtUserName control, the DataBindings Text drop down has (none), and if I type something like parms.UserName, I get an "Invalid property value" error. I've tried "parms.UserName", parms, "UserName", etc., and nothing works.
So, finally my question: where is some decent documentation & tutorial on how to use the DataBindings from the property page? Anyone have any comments on correct usage?
"Julie" <ju***@nospam.com> wrote in message
news:41***************@nospam.com... Anyone have any comments on this topic?
This is really off-topic in the groups you posted to.
Have you tried posting your question to
microsoft.public.dotnet.framework.windowsforms.dat abinding
? Julie wrote: I'm trying to use data bindings through the control properties, and getting nowhere at light-speed. The online help for data bindings is virtually useless as a tutorial on the subject, and I haven't been able to locate anything through Google.
I've set up data bindings manually, and they work just fine, but I'm just trying to figure out how to do it through the property page for the control. Manually (simplified), this is what I have (C# windows form app):
public class Parameters { private string userName; public string UserName { get { return userName; } set { userName = value; } } // etc. }
public class MyForm : Form { private Parameters parms; private TextBox txtUserName;
public MyForm() { InitializeComponent(); txtUserName.DataBindings.Add(new Binding("Text", parms, "UserName")); } // etc. }
and everything works just dandy.
*However*, what I want to be able to do is to create the databinding automatically through the property page DataBindings. For the txtUserName control, the DataBindings Text drop down has (none), and if I type something like parms.UserName, I get an "Invalid property value" error. I've tried "parms.UserName", parms, "UserName", etc., and nothing works.
So, finally my question: where is some decent documentation & tutorial on how to use the DataBindings from the property page? Anyone have any comments on correct usage?
"Daniel O'Connell [C# MVP]" wrote: "Julie" <ju***@nospam.com> wrote in message news:41***************@nospam.com... Anyone have any comments on this topic?
This is really off-topic in the groups you posted to. Have you tried posting your question to microsoft.public.dotnet.framework.windowsforms.dat abinding
Noooo -- I was not aware suce a newsgroup existed. I shall take my question
there with great haste.
Thanks
? Julie wrote: I'm trying to use data bindings through the control properties, and getting nowhere at light-speed. The online help for data bindings is virtually useless as a tutorial on the subject, and I haven't been able to locate anything through Google.
I've set up data bindings manually, and they work just fine, but I'm just trying to figure out how to do it through the property page for the control. Manually (simplified), this is what I have (C# windows form app):
public class Parameters { private string userName; public string UserName { get { return userName; } set { userName = value; } } // etc. }
public class MyForm : Form { private Parameters parms; private TextBox txtUserName;
public MyForm() { InitializeComponent(); txtUserName.DataBindings.Add(new Binding("Text", parms, "UserName")); } // etc. }
and everything works just dandy.
*However*, what I want to be able to do is to create the databinding automatically through the property page DataBindings. For the txtUserName control, the DataBindings Text drop down has (none), and if I type something like parms.UserName, I get an "Invalid property value" error. I've tried "parms.UserName", parms, "UserName", etc., and nothing works.
So, finally my question: where is some decent documentation & tutorial on how to use the DataBindings from the property page? Anyone have any comments on correct usage?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: D Witherspoon |
last post by:
I am developing a Windows Forms application in VB.NET that will use .NET
remoting to access the data tier classes.
A very simple way I have come up with is by creating typed (.xsd) datasets.
For...
|
by: JV |
last post by:
I just converted a big web project from VB.NET to C# and I got some very
strange runtime errors. Apparently, throughout the ASPX pages, the VB
version of this project used the expression <%#...
|
by: |
last post by:
I have a datagrid with a template column that has a hyperlink and a label.
The hyperlink text is bound to Title from my dataset and the label text is
bound to Author in the dataset. The grid...
|
by: vinayak |
last post by:
Hi
I am displaying data in Datagrid in ASP.NET with
Edit/Update functionality for each row. On the same page I
have 2 Button controls which submits the request to
server. These button controls...
|
by: Dnna |
last post by:
I have a table which is bound to an Internet Explorer XML
data island. I'm using ASP.NET's client-side validators
for an input field in the table. The problem is that if
the input fields are in...
|
by: NicK chlam via DotNetMonster.com |
last post by:
this is the error i get
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
at System.Data.Common.DbDataAdapter.Update(DataRow dataRows,
DataTableMapping tableMapping)
at...
|
by: bbernieb |
last post by:
Hi, All,
Is it possible to access a variable inside of a data binding, without the
variable being out of scope?
(Note: On the DataBinder line, I get an error message that says "Name 'i' is...
|
by: hope |
last post by:
Hi,
How can I format a string field using Data Formatting Expression property in
datagrid?
For example: format last name from BROWN to Brown.
Thanks
|
by: Lori Markle via .NET 247 |
last post by:
Hi, I already posted this but can't find it anywhere!
I'm having a problem that seems very simple. I'm trying to updatea db and am getting stuck on the data binding of a textbox. Iget a "Cannot...
|
by: mdh |
last post by:
>From p112 ( K&R).
Given an array declared as
static char arr= { { 0,1,........},{0,1,.....}};
let arr be passed as an argument to f.
f( int (*arr) ) {....}
It is noted that the...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |