1. First, an example
<Asp: gridview id = "gridview1" runat = "server" autogeneratecolumns = "false"
Cssclass = "vip_table" gridlines = "NONE" borderstyle = "NONE" cellpadding = "0"
Showheader = "false">
<Columns>
<Asp: templatefield headertext = "">
<Itemstyle/>
<Headerstyle/>
<Itemtemplate>
<Table class = "vip_table vip_tablebody">
<Tr>
<TD width = "30px" class = "vip_bodynum"> <% # convert. toint32 (container. dataitemindex) + 1%> </TD>
<TD width = "90px" class = "vip_bodytd"> <a href = "#" class = "a_detail"> <% # eval ("base_tabletnumber ") %> </a> </TD>
<TD width = "120px" class = "vip_bodytd"> <% # eval ("base_family") %> </TD>
<TD width = "120px" class = "vip_bodytd"> <% # eval ("base_mainstyleno") %> </TD>
<TD width = "60px" class = "vip_bodytd"> <% # eval ("base_vehiclebirthday") %> </TD>
<TD width = "120px" class = "vip_bodytd vip_bodytdprice"> <% # string. format ("{0: C2}", Eval ("base_expectprice ")). split ('. ') [0] %> </TD>
<TD width = "90px" class = "vip_bodytd"> <a href = "#" class = "a_detail"> View </a> </TD>
<TD width = "130px" class = "vip_bodytd">
<Input type = "text" name = "price" class = "vip_price fonttext"/> </TD>
<TD width = "">
<Input type = "Submit" value = "" class = "vip_commit"/> </TD>
</Tr>
</Table>
</Itemtemplate>
</ASP: templatefield>
</Columns>
</ASP: gridview>
2. Small issues related to the gridview
Border removal: borderstyle = "NONE" cellpadding = "0" gridlines = "NONE"
Add automatic serial number:
<Itemtemplate>
<% # Container. dataitemindex + 1%>
</Itemtemplate>
E. Row. cells [0]
Header removal: This. Maid = false;
Showheader = "false"
Set style:
Rowstyle is a regular row style, which is the same as setting tr. Selectedrowstyle: the style of the selected row. I don't know if it is the style at the bottom of the pagerstyle with the mouse placed on a row. The last line should be the style of the headers of headerstyle, which is the title, such as number, name, alternatingrowstyle.
Source: http://www.cnblogs.com/wuchao/archive/2012/08/15/2640254.html