Home All Groups Group Topic Archive Search About

Binding - problem with column name

Author
3 Jul 2006 2:11 PM
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

Author
4 Jul 2006 1:58 PM
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!
*************************************************
Show quote
"Qubeczek" <qubec***@poczta.onet.pl> wrote in message
news:e8b8in$lqk$1@news.onet.pl...
> 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
>
>
>
>
Author
11 Jul 2006 12:10 PM
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.

Show quote
U¿ytkownik "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM>
napisa³ w wiadomo¶ci news:ONX$8H3nGHA.2264@TK2MSFTNGP04.phx.gbl...
>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" <qubec***@poczta.onet.pl> wrote in message
> news:e8b8in$lqk$1@news.onet.pl...
>> 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
>>
>>
>>
>>
>
>

AddThis Social Bookmark Button