H
headbig003
Hello
I put template column in datagrid. Below is the html code I used.
<asp:datagrid id="dgAnswer" runat="server" Width="360px"
AutoGenerateColumns="False" DataKeyField="ansID">
<Columns>
<asp:TemplateColumn HeaderText="Answer Text">
<ItemTemplate>
<asp:TextBox id="txtItem" runat="server" Width="201px" Text='<%#
DataBinder.Eval(Container.DataItem, "ansDescription") %>'
MaxLength="100">
</asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
I use code behind to populate the datagrid using dataset.
Populating datagrid part is working fine, but when I tried to update
the textbox and tried to save it. Updated information doesn't save.
I would like to know how to get updated information from template
column.
I spent whole day to figure this out. I am exhausted and feel so
stupid.
Please help.....
p.s. Code behind C#.
I put template column in datagrid. Below is the html code I used.
<asp:datagrid id="dgAnswer" runat="server" Width="360px"
AutoGenerateColumns="False" DataKeyField="ansID">
<Columns>
<asp:TemplateColumn HeaderText="Answer Text">
<ItemTemplate>
<asp:TextBox id="txtItem" runat="server" Width="201px" Text='<%#
DataBinder.Eval(Container.DataItem, "ansDescription") %>'
MaxLength="100">
</asp:TextBox>
</ItemTemplate>
</EditItemTemplate></asp:TextBox>
</asp:TemplateColumn>
I use code behind to populate the datagrid using dataset.
Populating datagrid part is working fine, but when I tried to update
the textbox and tried to save it. Updated information doesn't save.
I would like to know how to get updated information from template
column.
I spent whole day to figure this out. I am exhausted and feel so
stupid.
Please help.....
p.s. Code behind C#.