Background color on textfield, color defined in datasource.
Background color on textfield, color defined in datasource.
I need to set the background-color of a textfield with a color given from my datasource. The textfield (datasource value) is on a databand.
I'm using the latest prerelease, designing with WebDesigner.Silverlight.
Any ideas?
I'm using the latest prerelease, designing with WebDesigner.Silverlight.
Any ideas?
Background color on textfield, color defined in datasource.
Hello,
Can you provide any sample in which format colors stored in your database? For example: Blacm, Red or 0xffffff or somethin also?
Thank you.
Can you provide any sample in which format colors stored in your database? For example: Blacm, Red or 0xffffff or somethin also?
Thank you.
Background color on textfield, color defined in datasource.
Thanks for replying.
I'm using rgb hex values for colors (0xRRGGBB), if there's a more convenient format I can change the data source XML.
I'm using rgb hex values for colors (0xRRGGBB), if there's a more convenient format I can change the data source XML.
Background color on textfield, color defined in datasource.
Hello,
You can use the following code in the BeforePrint event of databand, for example:
Please check the report sample in the attachment.
Thank you.
You can use the following code in the BeforePrint event of databand, for example:
Code: Select all
Text1.Brush = new StiSolidBrush(Color.FromArgb((int)(0xFF000000 | DataSource.ColorField)));
Thank you.
- Attachments
-
- 901.Report sample.zip
- (2.67 KiB) Downloaded 281 times
Background color on textfield, color defined in datasource.
Thanks alot Ivan, that worked! :biggrin:
Background color on textfield, color defined in datasource.
Great!
Have a nice day!
Have a nice day!