By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,243 Members | 1,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,243 IT Pros & Developers. It's quick & easy.

Resize Image in Datagrid

P: n/a
Hi,

With a database that stores the path of several images, i have:

<ASP:TemplateColumn ...>
<ItemTemplate>
<ASP:Image id="thePicture" ImageUrl=' <% #
DataBinder.Eval(Container.DataItem, "PictureRelativePath") %>' />
</ItemTemplate>
</ASP:TemplateColumn>

.....

I would like to resize the image (25% of the original) in that column of my
datagrid, but if i try with the DataGrid1_ItemCreated event, it doesn't
work.

Could you provide me any help ??!

Thanks.
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I have a sample that dynamically generates resized (thumbnail) images:

http://staff.develop.com/ballen/blog...8-9aff48bf2481

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

With a database that stores the path of several images, i have:

<ASP:TemplateColumn ...>
<ItemTemplate>
<ASP:Image id="thePicture" ImageUrl=' <% #
DataBinder.Eval(Container.DataItem, "PictureRelativePath") %>' />
</ItemTemplate>
</ASP:TemplateColumn>
....

I would like to resize the image (25% of the original) in that column
of my datagrid, but if i try with the DataGrid1_ItemCreated event, it
doesn't work.

Could you provide me any help ??!

Thanks.


Nov 19 '05 #2

P: n/a
Thanks, but i can't imagine there is no a more simple way to :
1/ retreive the Width property of the image
2/ when each item is created in the datagrid, just change the Width
property.

No ?
Nov 19 '05 #3

P: n/a
Yes, I imagine that would work as well.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks, but i can't imagine there is no a more simple way to :
1/ retreive the Width property of the image
2/ when each item is created in the datagrid, just change the Width
property.
No ?


Nov 19 '05 #4

P: n/a
but becuase the resize is done by the browser, the full image is downloaded
first, so what is the point of the scaling (usually done to impove page
rendering)?

-- bruce (sqlwork.com)

"Steph" <no_spam@no_spam.org> wrote in message
news:ei****************@TK2MSFTNGP14.phx.gbl...
Thanks, but i can't imagine there is no a more simple way to :
1/ retreive the Width property of the image
2/ when each item is created in the datagrid, just change the Width
property.

No ?

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.