I have gridview which have 6 colums 3 columns are dispaly from other table and 3 columns i want to enter i want when i press edit button all colums appear in edit mode and edit button change into update and when i press update all the data show which inckudes three auto display and 3 edit by me and all these 6 columns are also update in my database new table.
this is my .net code
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="Emptimesheet_sql" CellPadding="4" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:ButtonField Text="Edit" />
<asp:TemplateField HeaderText="Name" SortExpression="Name">
<EditItemTemplate>
<asp:TextBox ID="txt_NAME" runat="server" Text='<%# Bind("Name") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lbl_name" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="JobNumber" SortExpression="JobNumber">
<EditItemTemplate>
<asp:TextBox ID="txt_JOBNUMBER" runat="server" Text='<%# Bind("JobNumber") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lbl_jobnumber" runat="server" Text='<%# Bind("JobNumber") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Totaltime" SortExpression="Totaltime">
<EditItemTemplate>
<asp:textbox ID="txt_TOTALTIME" runat="server" Text='<%# Bind("Totaltime") %>'></asp:textbox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lbl_totaltime" runat="server" Text='<%# Bind("Totaltime") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CostBySalary">
<ItemTemplate>
<asp:label ID="lbl_costbysalary" runat="server"></asp:label>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox ID="txt_COSTBYSALARY" runat="server"></asp:textbox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CostByOverhead">
<ItemTemplate>
<asp:label ID="lbl_costbyoverhead" runat="server"></asp:label>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox ID="txt_COSTBYOVERHEAD" runat="server"></asp:textbox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<asp:label ID="lbl_date" runat="server"></asp:label>
</ItemTemplate>
<EditItemTemplate>
<asp:textbox ID="txt_DATE" runat="server" TextMode="Date"></asp:textbox>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:SqlDataSource ID="Emptimesheet_sql" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT Name, JobNumber, CONVERT (time(0), DATEADD(s, SUM(DATEPART(hh, Timer) * 3600 + DATEPART(mi, Timer) * 60 + DATEPART(ss, Timer)), 0)) AS Totaltime FROM Project_To_Done GROUP BY Name, JobNumber"></asp:SqlDataSource>
And my sql table
CREATE TABLE [dbo].[Time_Sheet](
[Name] [nchar](30) NOT NULL,
[JobNumber] [varchar](30) NOT NULL,
[Totaltime] [time](7) NOT NULL,
[CostBySalary] [money] NOT NULL,
[CostByOverhead] [money] NOT NULL,
[Date] [datetime] NOT NULL