Looks like the code is fine. I removed all AJAX references and extenders and it works fine. As is, so now need to just figure out why the AJAX is conflicting ;)
Binding in InsertItemTemplate won't help, just remove it. You can handle the ItemInserting event of DetailsView to access the TextBox and get the text (date) to assign it to the InsertParameters in ODS manually.
I have tried a few of the script Manager and Calendar Extension options but the UpdatePanel Progress just perminently stays there and nothing gets updated. I have even removed the textbox manipulation of the item that has the calendar extender and still
nada.
I am going to have to leave the site without the calendar Extension, or look for another one, or write my one ;)
Warren Macha...
Member
65 Points
50 Posts
Re: Data does not update in DetailsView
May 23, 2012 04:21 PM|LINK
Looks like the code is fine. I removed all AJAX references and extenders and it works fine. As is, so now need to just figure out why the AJAX is conflicting ;)
Warren Macha...
Member
65 Points
50 Posts
Re: Data does not update in DetailsView
May 23, 2012 04:35 PM|LINK
Okay the problem appears to be the calendar extender, anybody have any ideas why?
As soo as I add it to the ItemTemplate the detaislview does not update, see code below:
<InsertItemTemplate> <asp:TextBox ID="tbxDetailOrderDate" runat="server" Text='<%# Bind("OrderDate", "{0:d}") %>' /> <asp:CalendarExtender ID="tbxDetailOrderDate_CalendarExtender" runat="server" Enabled="True" TargetControlID="tbxDetailOrderDate"> </asp:CalendarExtender> </InsertItemTemplate>Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Data does not update in DetailsView
May 24, 2012 02:12 AM|LINK
Hi,
Binding in InsertItemTemplate won't help, just remove it. You can handle the ItemInserting event of DetailsView to access the TextBox and get the text (date) to assign it to the InsertParameters in ODS manually.
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
Warren Macha...
Member
65 Points
50 Posts
Re: Data does not update in DetailsView
May 24, 2012 04:46 AM|LINK
The AJAX calender extender allows a popup on that field, so the user can select date from a calender.
If I remove the extender the code works fine.
I just cannot have an extender on it if I want to do the bind. Perhaps I need to update the extender data somewhere?
Qin Dian Tan...
All-Star
113532 Points
12480 Posts
Microsoft
Re: Data does not update in DetailsView
May 24, 2012 04:50 AM|LINK
Hi,
It won't bind in InsertItemTemplate, so something "Bind()" in above code won't work. It is not like what you do in EditItemTemplate.
Thanks,
If you have any feedback about my replies, please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
Warren Macha...
Member
65 Points
50 Posts
Re: Data does not update in DetailsView
May 24, 2012 05:57 AM|LINK
I have tried a few of the script Manager and Calendar Extension options but the UpdatePanel Progress just perminently stays there and nothing gets updated. I have even removed the textbox manipulation of the item that has the calendar extender and still nada.
I am going to have to leave the site without the calendar Extension, or look for another one, or write my one ;)
Thanks all for the help