Last post Jun 14, 2008 05:50 AM by Anneleen
Apr 21, 2007 09:49 PM|diosloco|LINK
I have 3 small images being displayed in my GridView. One image is too tall for a row and so the row height is bigger then I would like it to be. Of course CSS is the answer. And before the adapters, I had a solution that worked (shorten for your viewing
But when I switched to the adapters, my ControlStyle CSS specification was lost. I tried doing something like
.GridView table tbody tr td image
but this doesn't work because I have other images in other columns of the GridView.
So is there a solution to this? Is this a bug? Or am I missing something?
"GridView css friendly adapter" ImageField ControlStyle
Apr 22, 2007 02:07 AM|Liming|LINK
adapater shouldn't effect the control inside i'd think? as it has nothign to do with the adapater... I never used "controlStyle-cssclass".. what if you just try CssClass?
Apr 22, 2007 06:26 PM|diosloco|LINK
Apr 23, 2007 09:48 AM|bdemarzo|LINK
Apr 24, 2007 12:52 PM|diosloco|LINK
I get my image URLs from an external source and do not store a local copy. Given that, I have no control over the image size. So while you present a possibly reasonable workaround for some developers, it isn't one that I can execute and more importantly,
it's a workaround, not a solution.
BTW: It also strips the HeaderStyle-CssClass and the FooterStyle-CssClass. HeaderStyle-CssClass is useful to me if I want to have one header cell look different than the others because it is sortable.
Apr 24, 2007 03:38 PM|Liming|LINK
Jun 14, 2008 05:50 AM|Anneleen|LINK
I see this is a rather old post but this is the correct sollution
<asp:ImageField ControlStyle-CssClass="img" />