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

Image not vertically aligning middle for a Hyperlink grid column

3 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig Hauzie
Top achievements
Rank 1
Craig Hauzie asked on 14 Jun 2012, 04:13 PM
I'm using an image with a hyperlink grid column but I am unable to get the image to vertically align in the middle. It almost appears like the grid is placing the image in the column an an unbreakable space ( & nbsp ;) causing the image to be forced to the top.

Any thoughts?

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Jun 2012, 02:52 PM
Hello Craig,

I have created a sample RadGrid web site where I demonstrated that the vertical alignment of the hyperlink column works as expected. Please check out the attached application and let me know what I am missing to reproduce the issue.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Craig Hauzie
Top achievements
Rank 1
answered on 25 Jun 2012, 08:40 PM
Hey Eyup.

Thank you for your reply. I did manage to get things working but 1 thing I noticed is that if I leave the TEXT attribute blank or don't even include it all -- I get the behavior I was originally writing about.

For example, if I do the following -- the image will not line up vertically

<telerik:GridHyperLinkColumn Text="" ImageUrl="~/Resources/Images/pencil.gif" DataNavigateUrlFormatString="~/GoTo.aspx?QuoteID={0}" DataNavigateUrlFields="QuoteID" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle"></telerik:GridHyperLinkColumn>

BUT if I do what you sent over it works perfectly.

<telerik:GridHyperLinkColumn Text="Link" ImageUrl="~/Resources/Images/pencil.gif" DataNavigateUrlFormatString="~/GoTo.aspx?QuoteID={0}" DataNavigateUrlFields="QuoteID" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle"></telerik:GridHyperLinkColumn>

Thanks, Craig.
0
Eyup
Telerik team
answered on 27 Jun 2012, 08:02 PM
Hi Craig,

I am glad the provided application has proven helpful. However, I am afraid I am not able to replicate the described issue. Everything works properly on my side even when I declare Text="". Are you applying any addition styling to your project which may cause this behavior?

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Craig Hauzie
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Craig Hauzie
Top achievements
Rank 1
Share this question
or