I am looking to display only 1 data field from the database table grid view in both columns and row wise rather than displaying all of them in rows.
Literally in data sense it looks like the following :
Column1 Column2 Column3
Row1 Data1 Data2 Data3
Row2 Data4 Data5 Data6
Row3 Data7 Data8 Data9
To be precise I want to display only the product's image from the database table ignoring the other fields so i just want the products image to appear in a table.
The actual output should like the image below ![Products table][1]
http://www.google.com.au/imgres?q=e+shop+in+table&um=1&hl=en&client=firefox-a&rls=org.mozilla:en-US:official&biw=1280&bih=921&tbm=isch&tbnid=x060V2C4fKhuCM:&imgrefurl=http://mixing-media.com/noticias/index&docid=p-enmrO8qB8a3M&w=499&h=486&ei=4MpeTrHoIunImAX0wqQF&开发者_如何学Gozoom=1&iact=rc&dur=317&page=8&tbnh=136&tbnw=140&start=211&ndsp=31&ved=1t:429,r:21,s:211&tx=46&ty=54
you have to turn AutoGenerateColumns
off for this, then put the columns inside the gridview yourself.
<asp:gridview id="gv1" AutoGenerateColumns="false" runat="server">
<columns>
// insert your columns here
</columns>
</asp:gridview>
in the columns, you can insert databound columns, template columns, etc. template columns are customisable.
see this for more info
精彩评论