Below mentioned is a simple aspx page with a datagrid specified columns.
i am confused why i am not getting OnEditCommand, OnUpdateCommand in dAtagrid <asp:GridView>
Also please let me know the significance of Alternating template field ,Edit template, Header template, footer and Item Template.
Thanks in ADvance
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataSourceID="sqlrec" Font-Names="Verdana"
Font-Size="XX-Small" >
<Columns>
<asp:BoundField DataField="name" HeaderText="name" />
<asp:BoundField DataField="f_name" HeaderText="f_name" />
<asp:BoundField DataField="l_name" HeaderText="l_name" />
<asp:BoundField DataField="city" HeaderText="city" />
<asp:BoundField DataField="state" HeaderText="state" />
<asp:BoundField DataField="id" HeaderText="id" />
<asp:ButtonField ButtonType="Button" Text="Add" />
<asp:ButtonField ButtonType="Button" Text="Save" />
<asp:ButtonField ButtonType="Button" Text="Update" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="sqlrec" runat="server" ConnectionString="<%$ ConnectionStrings:modelConnectionString %>"
SelectCommand="SELECT * FROM [record]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>