Why isn't my Ajax calendar extender working in this code ?

Hi;

I am trying to understand why my Ajax calendar extender is not working in a details view template.

Thanks for any insights !

Here is the code :

 <asp:TemplateField HeaderText="ClaimedDate" SortExpression="ClaimedDate">
                    <EditItemTemplate>
                        <asp:TextBox ID="textBox6" runat="server" Text='<%# Bind("ClaimedDate", "{0:d}") %>'></asp:TextBox>
                        <br />
                        <cc1:CalendarExtender ID="CalendarExtender14" runat="server">
                        </cc1:CalendarExtender>
                        <asp:RequiredFieldValidator ID="ClaimedDateValid" runat="server" ControlToValidate="textBox6"
                            ErrorMessage="You must enter a Claimed date"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label7" runat="server" Text='<%# Eval("ClaimedDate", "{0:d}") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Font-Bold="True" />
                    <ItemStyle HorizontalAlign="Right" Width="300px" Wrap="True" />
                    <ControlStyle Width="300px" />                    
                </asp:TemplateField>
gggoddardAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

masterpassCommented:
You must the set the TargetControlID of the calender extender set to the textbox ... See the code below

I hope this helps
<asp:TextBox ID="textBox6" runat="server" Text='<%# Bind("ClaimedDate", "{0:d}") %>'></asp:TextBox>
<br />
<cc1:CalendarExtender ID="CalendarExtender14" runat="server" TargetControlID="textBox6">                        </cc1:CalendarExtender>

Open in new window

0
gggoddardAuthor Commented:
Thanks masterpass.
I added that property and still no calendar control ?
What else can I try ?
Remember that this is a detailsview control so is position for the calendar popup
important ?
 
0
masterpassCommented:
That is totally weird. I had some thing like this in the details view today .... The same code ...

I added that property and still no calendar control ? >>>>>>>>>>

may be this can be a foolish question ... The calender extender will be displayed only when you click inside the textbox ... I hope tht you have tried that ...

Open in new window

0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

gggoddardAuthor Commented:
Yes I tried that.
I haven't tried using the asp calander though.
0
masterpassCommented:
Is this Calender control rendering outside the detailsView ?

Also, what is the ajaxtoolkit version that you are using ? If its not latest, try to download the latest ajaxtoolkit dll from the codeplex and try

http://ajaxcontroltoolkit.codeplex.com/releases/view/43475
0
gggoddardAuthor Commented:
Thanks Again
I have used the calander extensions on the main page of this form and they work.
The details view control resides in a panel which becomes visible after a button click.
As to the Ajax version it is 1.0 but I am more than a little hesitant to change versions at this point.
 
0
masterpassCommented:
I had this sample working for me perfectly well

NB: the code is perfect. Can you create a sample application with the latest DLL and see if its working. This way we can we sure if its an issue with early versions of ajaxtoolkit . If I remember correctly, they had a bunch of issue with earlier versions of ajaxtoolkit especially with . If interested, you can see the issue tracker in the codeplex

Also please note ... make sure you don't have any javascript errors ... JS errors can make the extenders not to work.
<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px"
        DataSourceID="SqlDataSource1" AutoGenerateRows="False"
        AutoGenerateEditButton="True">
    <Fields>    
    <asp:TemplateField>
    <ItemTemplate>
        <asp:Label ID="Label1" runat="server" Text='<%#Eval("DateofBirth") %>'></asp:Label>
    </ItemTemplate>
        <EditItemTemplate>
        <asp:TextBox ID="TextBox1" runat="server" Text='<%#Bind("DateofBirth") %>'></asp:TextBox>
        <cc1:CalendarExtender ID="CalendarExtender1"  TargetControlID="TextBox1"   runat="server">
        </cc1:CalendarExtender>
        </EditItemTemplate>
    </asp:TemplateField>
    </Fields>
    </asp:DetailsView>

Open in new window

0
gggoddardAuthor Commented:
Hi;
The problem was that I openning my detailsview control in a panel.
When I disabled the panel and opened the gridview diretly I was then able to use the
Ajax calendars.
Thanks Anyway !
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.