Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Contributor
6228 Points
3226 Posts
Oct 12, 2009 08:19 AM|LINK
Many thanks. I've put this shown below and the key name is based on the item also shown below but I've got the following error (in italic) DataKeyNames="itm_start_dt"
<asp:TemplateField HeaderText="Start Date" HeaderStyle-HorizontalAlign="Left" > <ItemTemplate> <asp:TextBox runat="server" ID="itm_start_dt" HtmlEncode="False" ForeColor="DarkBlue" BackColor="AntiqueWhite" BorderStyle="None" ReadOnly="true" Width="65px" Text='<%# Eval("start_dt") %>'/> </ItemTemplate> <EditItemTemplate> <asp:TextBox runat="server" ID="edi_start_dt" HtmlEncode="False" Enabled="true" Width="65px" Text='<%# Eval("start_dt") %>' /> </EditItemTemplate> </asp:TemplateField>
Server Error in '/' Application. --------------------------------------------------------------------------------
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'chk_start_dt2'.
wmec
Contributor
6228 Points
3226 Posts
Re: Onrowcreated
Oct 12, 2009 08:19 AM|LINK
Many thanks. I've put this shown below and the key name is based on the item also shown below but I've got the following error (in italic)
DataKeyNames="itm_start_dt"
<asp:TemplateField HeaderText="Start Date" HeaderStyle-HorizontalAlign="Left" >
<ItemTemplate>
<asp:TextBox runat="server" ID="itm_start_dt" HtmlEncode="False" ForeColor="DarkBlue" BackColor="AntiqueWhite" BorderStyle="None"
ReadOnly="true" Width="65px" Text='<%# Eval("start_dt") %>'/>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID="edi_start_dt" HtmlEncode="False"
Enabled="true" Width="65px" Text='<%# Eval("start_dt") %>' />
</EditItemTemplate>
</asp:TemplateField>
Server Error in '/' Application.
--------------------------------------------------------------------------------
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'chk_start_dt2'.
HuaMin Chen