Welcome Guest Search | Active Topics | Sign In | Register

how to get datepicker working nside updatepanel Options
turpya
Posted: Friday, October 16, 2009 3:20:55 AM
Rank: Member
Groups: Member

Joined: 6/8/2007
Posts: 19
Hi,
I have an updatepanel that triggers an async postback when a radio button is selected from a radiobuttonlist. Inside the updatepanel is a table containing some controls, including a datepicker and some textboxes. When a radiobutton selection is made, either 'yes' or 'no', the table inside the content template either disappears or displays depending on what is selected. If 'yes' is selected, the table displays and asks for more information - this all works - however when you attempt to click the datepicker icon to select a date, it doesn't work. Is there something I'm missing here? Any help greatly appreciated. Thanks.

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="lblAddress4" runat="server" Text="Has person been notified?:"></asp:Label><br /><br /><asp:RadioButtonList ID="radNotified" runat="server" AutoPostBack="true"
RepeatDirection="Horizontal">
<asp:ListItem>Yes</asp:ListItem>
<asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<table border=0><tr><td><img align="middle" src="../images/ajax-loader.gif" alt="" /></td><td><asp:Label ID="lblCalcing" CssClass="bodytext" runat="server" Text="Updating. Please wait..." ForeColor="#1C7BB5"></asp:Label></td></tr></table>
</ProgressTemplate>
</asp:UpdateProgress>
<table id="tblNotified" runat="server" width="100%" border="0">
<tr>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<asp:Label ID="lblAddress5" runat="server" Text="Person(s) spoken to:"></asp:Label>
</td>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<asp:TextBox ID="txtPersonsSpokenTo" runat="server" MaxLength="200"></asp:TextBox>
</td>
</tr>
<tr>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<asp:Label ID="lbl6" runat="server" Text="Date spoken to:"></asp:Label>
</td>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<eo:DatePicker ID="DatePicker1" runat="server" ControlSkinID="None"
DayCellHeight="16" DayCellWidth="19" DayHeaderFormat="FirstLetter"
DisabledDates="" OtherMonthDayVisible="True" PickerFormat="dd/MM/yyyy"
SelectedDates="" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
TitleRightArrowImageUrl="DefaultSubMenuIcon" VisibleDate="2009-10-01">
<todaystyle csstext="font-family: tahoma; font-size: 12px; border-right: #bb5503 1px solid; border-top: #bb5503 1px solid; border-left: #bb5503 1px solid; border-bottom: #bb5503 1px solid" />
<SelectedDayStyle CssText="font-family: tahoma; font-size: 12px; background-color: #fbe694; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<disableddaystyle csstext="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<pickerstyle csstext="font-family:Courier New; padding-left:5px; padding-right: 5px;" />
<calendarstyle csstext="background-color: white; border-right: #7f9db9 1px solid; padding-right: 4px; border-top: #7f9db9 1px solid; padding-left: 4px; font-size: 9px; padding-bottom: 4px; border-left: #7f9db9 1px solid; padding-top: 4px; border-bottom: #7f9db9 1px solid; font-family: tahoma" />
<titlearrowstyle csstext="cursor:hand" />
<dayhoverstyle csstext="font-family: tahoma; font-size: 12px; border-right: #fbe694 1px solid; border-top: #fbe694 1px solid; border-left: #fbe694 1px solid; border-bottom: #fbe694 1px solid" />
<monthstyle csstext="font-family: tahoma; font-size: 12px; margin-left: 14px; cursor: hand; margin-right: 14px" />
<TitleStyle CssText="background-color:#9ebef5;font-family:Tahoma;font-size:12px;padding-bottom:2px;padding-left:6px;padding-right:6px;padding-top:2px;" />
<OtherMonthDayStyle CssText="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<DayHeaderStyle CssText="font-family: tahoma; font-size: 12px; border-bottom: #aca899 1px solid" />
<DayStyle CssText="font-family: tahoma; font-size: 12px; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
</eo:DatePicker>
</td>
</tr>
<tr>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<asp:Label ID="lblAddress7" runat="server" Text="What were they told?:"></asp:Label>
</td>
<td class="bodytext" bgcolor="#F5F5F5" style="height: 34px">
<asp:TextBox ID="txtTold" runat="server" Rows="4" TextMode="MultiLine"
Width="400px"></asp:TextBox>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="radNotified" EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="DatePicker1" EventName="SelectionChanged" />
</Triggers>
</asp:UpdatePanel>
eo_support
Posted: Friday, October 16, 2009 10:33:52 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try place an eo:ScriptManager outside of the UpdatePanel and see if that works. Note its eo:ScriptManager, not asp:ScriptManager.

Thanks!
turpya
Posted: Friday, October 16, 2009 4:36:51 PM
Rank: Member
Groups: Member

Joined: 6/8/2007
Posts: 19
Thank-you! It's working fine now!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.