Binding - problem with column name

  • Thread starter Thread starter Qubeczek
  • Start date Start date
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
 
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!
*************************************************
 
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
 
Back
Top