This is an example code...Just go through it...Are you looking for something like this?
<asp:TemplateField HeaderText ="Edit" >
<ItemTemplate >
<asp:LinkButton ID ="lnk1" runat ="server" Text ="Edit" CommandName ="edit">
</asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>