This is a migrated thread and some comments may be shown as answers.

Binding to set StyleBackgroundImage

1 Answer 148 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 11 Nov 2011, 09:50 AM
I can set an image URI if I use a picture box.

But the only option I seem to have when binding is to bind the actual image.

So, given that I need to pass the URI of an image to the report (this is for the logo to be used. It is stored as a physical file on the web server. There is no option for saving it in the DB) and that I want to use said image as a background for my Page Header, what do I do?

I know I could just use a picture box, but the image is fairly big and uses a lot of space. I can't overlap the image and the textboxes the data from my Page Header 'cos that's not allowed, so my only real option is to set the image as the background image in the style.

As always, any and all help, etc.

--
Stuart

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 11 Nov 2011, 01:19 PM
Hello Stuart,

You can create an user function ConvertImage(string url) that takes the URL string and converts it to Image type. The image type then can be bound to the Style.BackgroundImage.ImageData property of the page header. Find attached a sample project with this functionality.

Kind regards,
Elian
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Elian
Telerik team
Share this question
or