|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Binding - problem with column nameI 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. -- Show quoteGregory 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 > > > > 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 >> >> >> >> > > |
|||||||||||||||||||||||