<Columns><%--连接数据源--%>
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"SortExpression="id" Visible="False"/>
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name"/>
<asp:BoundField DataField="age" HeaderText="age" SortExpression="age"/>
<asp:BoundField DataField="address" HeaderText="address" SortExpression="address"/>
<asp:TemplateField >
<HeaderTemplate >
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True"SortExpression="id" Visible="False"/>
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name"/>
<asp:BoundField DataField="age" HeaderText="age" SortExpression="age"/>
<asp:BoundField DataField="address" HeaderText="address" SortExpression="address"/>
<asp:TemplateField >
<HeaderTemplate >
<asp:CheckBox runat="server"/></HeaderTemplate>
<ItemTemplate >
<asp:CheckBox runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><%--模板列--%>
<ItemTemplate>
<asp:LinkButton Text ="Link" runat ="server" CommandName="compile" CommandArgument ='<%#Eval("id")%>'>编辑</asp:LinkButton>
<ItemTemplate >
<asp:CheckBox runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField><%--模板列--%>
<ItemTemplate>
<asp:LinkButton Text ="Link" runat ="server" CommandName="compile" CommandArgument ='<%#Eval("id")%>'>编辑</asp:LinkButton>
<asp:LinkButton Text="Link" runat ="server" CommandName ="dele" CommandArgument ='<%#Eval("id") %>'>删除</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</ItemTemplate>
</asp:TemplateField>
</Columns>