Binding - problem with column name

Q

Qubeczek

Hello,
I have the following problem.

I have my own component descendand for TextBox, Where I have property
"DataField", that indicate into column name of DataView.

When I set this property, there is automaticali genmerates Binding Text
porperty into particular column.

The "DataSource" is DataView.

I have a problem, when column incudes dot (".")

F. ex

TextBox1.Bindings.Add("Text",myDataView1,"CUSTOMER.ID") throws exception

"Cannot binds to property or column ID".

How to type column name, thats include dots, to be threated properly ?

Regards
Qubeczek
 
C

Cowboy \(Gregory A. Beamer\)

I would try surrounding Customer.ID with [], but I am not sure that works.

A better option would be to get away from the dotted notation completely.
You can do it by changing the select query that fills the DataSet. You then
can name this CustomerID instead and avoid this issue.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
Q

Qubeczek

Helo,
thans.

The "dot" problem is unbreakable. I had give up.

I use notations with "^" for may convininience.

The breaks [] dosen't work.

Thans for help
Qubeczek.

U¿ytkownik "Cowboy (Gregory A. Beamer) said:
I would try surrounding Customer.ID with [], but I am not sure that works.

A better option would be to get away from the dotted notation completely.
You can do it by changing the select query that fills the DataSet. You
then can name this CustomerID instead and avoid this issue.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
Qubeczek said:
Hello,
I have the following problem.

I have my own component descendand for TextBox, Where I have property
"DataField", that indicate into column name of DataView.

When I set this property, there is automaticali genmerates Binding Text
porperty into particular column.

The "DataSource" is DataView.

I have a problem, when column incudes dot (".")

F. ex

TextBox1.Bindings.Add("Text",myDataView1,"CUSTOMER.ID") throws exception

"Cannot binds to property or column ID".

How to type column name, thats include dots, to be threated properly ?

Regards
Qubeczek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top