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

DataBinding problem

Hi

I'm attempting to bind a Textbox.Text property to a custom object/property
in C#. My form has an instance of my class in a property called
Integration, I'm attempting to bind the textbox by:

< code >
txtFilename.DataBindings.Add("Text", Integration, "Filename") ;
< /code >

Everything is present and correct, Filename is a string type and my class is
instantiated fine, but .Net just says it can't bind to Filename property on
the textbox.

Sounds like a bug, but it's such a simple prospect that I would expect .Net
to handle.

Any ideas?
Thanks
Nov 15 '05 #1
2 1113
Hi,

Just to be safe, ensure "Filename" is a public property of a type the
Integration object is instance of.
In other words, a code snippet like this:

string temp = Integration.Filename

should be compiled without errors.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Mantorok" <kb*********@tiscali.co.uk> wrote in message
news:c0**********@newsfeed.th.ifl.net...
Hi

I'm attempting to bind a Textbox.Text property to a custom object/property
in C#. My form has an instance of my class in a property called
Integration, I'm attempting to bind the textbox by:

< code >
txtFilename.DataBindings.Add("Text", Integration, "Filename") ;
< /code >

Everything is present and correct, Filename is a string type and my class is instantiated fine, but .Net just says it can't bind to Filename property on the textbox.

Sounds like a bug, but it's such a simple prospect that I would expect ..Net to handle.

Any ideas?
Thanks


Nov 15 '05 #2
Hi

Oh, it's definitely public, at the moment I'm using the properties to
populate each textbox "manually" and then setting the values from the
textbox to the class properties on closing the form.

Thanks
Kev

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:#H*************@tk2msftngp13.phx.gbl...
Hi,

Just to be safe, ensure "Filename" is a public property of a type the
Integration object is instance of.
In other words, a code snippet like this:

string temp = Integration.Filename

should be compiled without errors.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Mantorok" <kb*********@tiscali.co.uk> wrote in message
news:c0**********@newsfeed.th.ifl.net...
Hi

I'm attempting to bind a Textbox.Text property to a custom object/property in C#. My form has an instance of my class in a property called
Integration, I'm attempting to bind the textbox by:

< code >
txtFilename.DataBindings.Add("Text", Integration, "Filename") ;
< /code >

Everything is present and correct, Filename is a string type and my
class is
instantiated fine, but .Net just says it can't bind to Filename property

on
the textbox.

Sounds like a bug, but it's such a simple prospect that I would expect

.Net
to handle.

Any ideas?
Thanks

Nov 15 '05 #3

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

Similar topics

4
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox),...
3
by: Kevin Swanson | last post by:
I'm writing what should be a very simple app against an Oracle database. The app has a number of user controls, any one of which is loaded into a main display page using the loadControl method,...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
9
by: J055 | last post by:
Hi I have a very simple configuration of the GridView with paging and sorting. When I do a postback the DataBinding event fires twice - in both the ProcessPostData and PreRender stages of the...
8
by: Dirk | last post by:
Hello, I have a problem to use databinding with my business layer classes. My data class does not have simple properties (string, int or datetime), instead, all my properties are objects of the...
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: 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
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: 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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.