This is a migrated thread and some comments may be shown as answers.

Date picker not updating database on edit

3 Answers 111 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
ShamusFoo
Top achievements
Rank 1
ShamusFoo asked on 23 Feb 2010, 03:42 PM

 

I have a new record (an HTML ASP.NET form) and and edit records (an ASP.NET FormView).

I use the date picker in both.  Whe nI create a new record, the data is saved fine.

When I open the FormView to edit, the proper date is bound and pre-loaded into the RAD date picker.

When I change the data in the edit form and submit, the date does not change.  All other fields in the form view update correctly, so I do not think the events are not firing.

Here is the HTML"


<
asp:FormView ID="FormView1" runat="server" Caption="Company Details"

 

 

CssClass="dataTable" DataKeyNames="Id" DataSourceID="LinqDataSource1"

 

 

DefaultMode="Edit" onitemcommand="FormView1_ItemCommand"

 

 

onitemupdated="FormView1_ItemUpdated">

 

 

<RowStyle CssClass="rowa" />

 

 

<EditItemTemplate>

 

 

<table cellpadding="0" cellspacing="0" class="style1">

 

 

// CLIPPED FOR READABILITY

 

 

<tr>

 

 

<td>

 

URL:

</td>

 

 

<td>

 

 

<asp:TextBox ID="URLTextBox" runat="server" CssClass="textBox"

 

 

Text='<%# Bind("URL") %>' Width="200px" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

 

&nbsp;</td>

 

 

<td>

 

 

<asp:CheckBox ID="IsActiveCheckBox" runat="server"

 

 

Checked='<%# Bind("IsActive") %>' Text="Is Active?" />

 

 

<asp:CheckBox ID="IsQIBCheckBox" runat="server" Checked='<%# Bind("IsQIB") %>'

 

 

Text="Is QIB?" />

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

QIB Exp Date:

</td>

 

 

<td>

 

 

<radCln:RadDatePicker ID="txtQibDate" Runat="server"

 

 

Culture="English (United States)" EnableTyping="False"

 

 

DbSelectedDate='<%# Bind("QIB_Exp_Date") %>'>

 

 

<DateInput Skin="">

 

 

</DateInput>

 

 

</radCln:RadDatePicker>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

&nbsp;<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"

 

 

CommandName="Update" CssClass="linkButton" Text="Update" />

 

 

&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"

 

 

CausesValidation="False" CommandName="Cancel" CssClass="linkButton"

 

 

Text="Cancel" />

 

 

</EditItemTemplate>


Thanks.

 

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 25 Feb 2010, 02:29 PM
Hello ShamusFoo,

I have attached a small sample project based on your scenario that runs as expected on my side. Please give it a try and let me know how it goes.

I hope this helps,
Martin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
ShamusFoo
Top achievements
Rank 1
answered on 25 Feb 2010, 06:26 PM
Your sample looks pretty much like mine.  Neither one works.  Thanks.

Do I require the 'RadControls' folder for this to work?

It seems to function properly.  The pop-up appears, the new date gets added to the text box.  Just when I submit, the new date never gets saved.

All the other fields in the formview update correctly.

Thanks.
0
Martin
Telerik team
answered on 03 Mar 2010, 06:38 AM
Hello ShamusFoo,

I am afraid that I can not confirm the issue on my side - I double checked the test project I sent you, and it works as expected. Could you please confirm that you have tried it on your machine?

Since I am not able to replicate the problem I would suggest you to open a formal support ticket and send us a small sample project that we could debug locally. This way we would be able to trace the cause of the issue and provide you with the needed resolution.

Regards,
Martin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Calendar
Asked by
ShamusFoo
Top achievements
Rank 1
Answers by
Martin
Telerik team
ShamusFoo
Top achievements
Rank 1
Share this question
or