I have i Gridview with a templatefield. Calender shows on edit for users to be able to change date. It does not work. Thx for help. Best regards Halvard
<asp:GridView ID="GridView7" runat="server" DataSourceID="SqlDataSource6" EnableModelValidation="True" AllowSorting="True" AutoGenerateColumns="False" >
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:TemplateField HeaderText="Förfallodatum" SortExpression=" Förfallodatum" >
<EditItemTemplate>
<asp:Calendar ID="Calendar1" runat="server" VisibleIndex="4"
SelectedDate='<%# Bind("Forfallodatum") %>'
VisibleDate='<%# Eval("Forfallodatum") %>'>
</asp:Calendar>
<asp:TextBox ID="TextBox3" runat="server"
Text='<%# Bind("Forfallodatum") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:TextBox ID="TextBox3" runat="server"
Text='<%# Eval("Forfallodatum") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
SQL:
UpdateCommand="UPDATE faktura SET Forfallodatum = ? WHERE nr = ?
UPDATEPARAMETER