如何设置gridview的单元格的高度和宽度。 [英] How to set the height and width of the cells of the gridview.
本文介绍了如何设置gridview的单元格的高度和宽度。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图像区域,其中图像大小为255 * 240,但我想在gridview中将它们显示为55 * 55.
我的语法是
I have a image field in which image size is 255*240 but i want to show them in the gridview as 55*55.
my syntax is
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" Height="55px" Width="55px">
<columns>
<asp:ImageField DataImageUrlField="img">
<HeaderStyle Height="55px" Width="55px" />
<itemstyle height="55px" width="55px" />
<asp:HyperLinkField DataNavigateUrlFields="link"DataTextField="name" > <itemstyle font-bold="True" font-italic="True" mode="hold" />
Names="Mongolian Baiti" Font-Size="Small" />
</columns>
但这不起作用。
But this is not working.
推荐答案
查看这些链接并弄清楚如何显示图像在GridView中以及高度和宽度。
在Gridview中显示图像细胞有条件地 [ ^ ]
将图像保存到asp.net中的数据库并显示到GridView [ ^ ]
在GridView中显示数据库中的图像 [ ^ ]
问候..
See these links and figure out how to display images in GridView along with Height and Width.
Display Image in Gridview Cell conditionally[^]
Saving images into the database in asp.net and displaying to the GridView[^]
Displaying Images from a Database in a GridView[^]
Regards..
这篇关于如何设置gridview的单元格的高度和宽度。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文