Dear all,
In a db table i have 3 columns for the backcolor of a specific object in my form, which is changing according to the record one column is for Red the other for Green and the last for Blue.(the column's names are colr,colg,colb)
So i am trying to to bind the backcolor property of the object with the columns and does'nt work.
If i write it like this then i have the error:
Can not bind to property BackColor.R
this.lblcode.DataBindings("Backcolor.R",ds_data,"table.colr");
this.lblcode.DataBindings("Backcolor.G",ds_data,"table.colg");
this.lblcode.DataBindings("Backcolor.B",ds_data,"table.colb");
Of course a solution is to save the value of each column in local variables for the current row of dataset and then:
lblcode.BackColor.R=var1;
lblcode.BackColor.G=var2;
lblcode.BackColor.B=var3;
but i wondering if it's possible to do it with databindings
Any ideas?
Many Many thanks!
In a db table i have 3 columns for the backcolor of a specific object in my form, which is changing according to the record one column is for Red the other for Green and the last for Blue.(the column's names are colr,colg,colb)
So i am trying to to bind the backcolor property of the object with the columns and does'nt work.
If i write it like this then i have the error:
Can not bind to property BackColor.R
this.lblcode.DataBindings("Backcolor.R",ds_data,"table.colr");
this.lblcode.DataBindings("Backcolor.G",ds_data,"table.colg");
this.lblcode.DataBindings("Backcolor.B",ds_data,"table.colb");
Of course a solution is to save the value of each column in local variables for the current row of dataset and then:
lblcode.BackColor.R=var1;
lblcode.BackColor.G=var2;
lblcode.BackColor.B=var3;
but i wondering if it's possible to do it with databindings
Any ideas?
Many Many thanks!