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

Dynamic Images in a Table

8 Answers 945 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 23 Nov 2009, 12:27 PM
Hi there,

I'd like to display an image dynamically against each row of a table based on the object in the datasource. Is there an existing example of this being done at all please?

Many thanks, Carl

8 Answers, 1 is accepted

Sort by
0
VINEET
Top achievements
Rank 2
answered on 17 Jul 2012, 01:15 PM
Hello Telerik
i have the same problem
i want to show images in table row, image path is stored in database .
i am binding table using needdatasource .
please provide me any implemented example.
thanks in advance
0
Peter
Telerik team
answered on 20 Jul 2012, 08:19 AM
Hello Vineet,

Why you are using the NeedDataSource event? Generally we highly recommend to use declarative SqlDataSource component instead. Additionally the PictureBox works directly with image paths. Just right click the PictureBox, select Expressions and select the appropriate field for the image paths.

Kind regards,
Peter
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
VINEET
Top achievements
Rank 2
answered on 20 Jul 2012, 08:40 AM
Hi Peter
thanks for reply.
Actually i am fetching data using open access. and after fetching i am performing some calculation on that and after filtering data i am binding this to table.
thanks
0
Peter
Telerik team
answered on 23 Jul 2012, 09:15 AM
Hi VINEET,

The OpenAccessDataSource Component enables data items to connect to an OpenAccess Model. Additionally you can use parameter as elaborated in Using parameters with the OpenAccessDataSource component and you do some calculations by using calculated fields and user functions.

You may find useful the following help resources:

Greetings,
Peter
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Phil
Top achievements
Rank 1
answered on 20 Aug 2020, 10:23 PM

I see above... My image is pulling from a separate sqldatasource than the main report.

I can't assign a data source to the image because imagebox does not have the datasource property.  Therefor, I cannot set it to Fields.Image.

I have strategically made a separate datasource for the image because it will change dynamically with a parameter that is passed in for each client.  The image data is stored in the database.  The 'LogoDataSource' returns the correct field, but I dont know how to assign this data source to the image box.

0
Todor
Telerik team
answered on 25 Aug 2020, 06:32 AM

Hi Phil,

You may place the PictureBox in a List item and assign the 'LogoDataSource' as a DataSource for the List. Then you will be able to use Fields.Image in the PictureBox inside the List.

Regards,
Todor
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Phil
Top achievements
Rank 1
answered on 25 Aug 2020, 01:25 PM

Thanks Todor, this worked for me!

I have one more question.  I know it is easy part, but my image seems to grow too large, outside the bounds of the size I have set.  If there an option to make sure the image shrinks to fit the size I have set?  Even proportionally shrink?  Could you give an example of the property and how to use.

Thanks for the help,

Phil

0
Todor
Telerik team
answered on 28 Aug 2020, 09:03 AM

Hi Phil,

I confirm that the PictureBox item has a scaling property Sizing. See Clipping and positioning for more details and the available options.

Regards,
Todor
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
Carl
Top achievements
Rank 1
Answers by
VINEET
Top achievements
Rank 2
Peter
Telerik team
Phil
Top achievements
Rank 1
Todor
Telerik team
Share this question
or