Hi in my project page I gave managed to make a gridview editable but
when I changed the cell values and press save button,
at server side code I am getting all the cell values empty? Why?
How to access it?
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
CellPadding="3" DataKeyNames="quotationid" DataSourceID="PubsDataSource">
<FooterStyle BackColor="White" ForeColor="#000066" />
<Columns>
<asp:BoundField DataField="quotationid" HeaderText="quotationid" InsertVisible="False" ReadOnly="True"
SortExpression="quotationid" />
<asp:TemplateField HeaderText="project_number" SortExpression="project_number">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("narration") %>'
OnTextChanged="TextBox_TextChanged" BorderStyle="None"></asp:TextBox>
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("quotationid") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="description" SortExpression="description">
<ItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("kindattention") %>'
OnTextChanged="TextBox_TextChanged" BorderStyle="None"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="manager" SortExpression="manager">
<ItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("enquiryno") %>'
OnTextChanged="TextBox_TextChanged" BorderStyle="None"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="PubsDataSource" runat="server"
SelectCommand="SELECT * FROM [quotation]"
UpdateCommand="UPDATE [quotation] set Narration='Changed Narration' where quotationid = @quotationid"
ConnectionString="<%$ ConnectionStrings:Pubs %>" />
Or my whole approach is wrong?