CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums



Zone: > Asp.Net Forum > asp.net_ajax.asp.net_ajax_ui Tags:
Item Type: Date Entered: 1/7/2008 2:20:56 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
9.50
XPoints: N/A Replies: 4 Views: 11902 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages |< << Go >> >|
"tanfong" <>
NewsGroup User
Using the Popup control Extender in Gridview Item Template10/19/2006 4:47:40 PM

-2

Heres the issue,  Im using the Calendar popup control in the gridview Item Template, when i go to select a date it puts in 1/1/0001 as the date.

Code  for the Gridview template , the textbox is binding to object datasource.

Am i missing something in the calendar1_selectionChange ? 

protected void Calendar1_SelectionChanged(object sender, EventArgs e)

{

 

PopupControlExtender.GetCurrent(this.Page).Commit(Calendar1.SelectedDate.ToShortDateString());

}

 

<asp:TemplateField HeaderText="est. Close Date" SortExpression="estimatedclosedate">

<ItemTemplate>

<atlas:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:TextBox ID="tbEstCloseDate" runat="server" Text='<%# Bind("estimatedclosedate","{0:d}") %>'

Width="65px" Font-Names="Verdana" BackColor="White" Font-Size="Smaller"></asp:TextBox>

<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">

<center>

<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"

CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"

ForeColor="Black" Width="160px" OnSelectionChanged="Calendar1_SelectionChanged">

<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />

<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />

<SelectorStyle BackColor="#CCCCCC" />

<WeekendDayStyle BackColor="#FFFFCC" />

<OtherMonthDayStyle ForeColor="#808080" />

<NextPrevStyle VerticalAlign="Bottom" />

<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />

<TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" />

</asp:Calendar>

</center>

<atlasToolKit:PopupControlExtender ID="PopupControlExtender1" runat="server">

<atlasToolKit:PopupControlProperties TargetControlID="tbEstCloseDate" PopupControlID="Panel1"

Position="Bottom" />

</atlasToolKit:PopupControlExtender>

</asp:Panel>

</ContentTemplate>

</atlas:UpdatePanel>

</ItemTemplate>

</asp:TemplateField>

"tanfong" <>
NewsGroup User
Re: Using the Popup control Extender in Gridview Item Template10/20/2006 5:50:16 AM

0

I figured it out, by puting the panel outside of the Item Template, on the main form, but keeping the popup control extender inside the item template with the textbox. This works.

 

"tanfong" <>
NewsGroup User
Re: Using the Popup control Extender in Gridview Item Template10/21/2006 5:05:00 AM

0

After updating to the ajax beta1 and the ajax toolkit, the popupcontrol extender doesnt work in the Item template at all. Right when i just got it to work with the old stuff, they had to change the extenders.  Anyone get a popup control extender to work in an item template on the ajax beta1 and ajax toolkit?

"Fredrik K" <>
NewsGroup User
Re: Using the Popup control Extender in Gridview Item Template10/21/2006 8:47:58 AM

3

I'm having the same issue with the DropDownExtender ; it refuses to work inside a template, but the exact same code works perfectly outside the template.

Blog: http://blog.iridescence.no
"mcslayton" <>
NewsGroup User
Re: Using the Popup control Extender in Gridview Item Template10/24/2006 1:19:07 AM

-2

The GridView below "sort of works". Except for the following very frustrating things:

  1. The calendar shows up positioned below the date TextBox1 immediately upon going to Edit Mode on the grid (I want it to only show when cursor placed in TextBox1).
  2. I can't figure out how to set Calendar1 VisibleDate property to the initial value of the the TextBox1. I want the date from the database to be Visible in the calendar when it pops up.

Let me know if you guys make any progress. 

         <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="TaskID" DataSourceID="ObjectDataSource2"
            PageSize="5">
            <Columns>
               <asp:CommandField ShowEditButton="True" />
               <asp:BoundField DataField="Sequence" HeaderText="Sequence" SortExpression="Sequence" />
               <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
               <asp:CheckBoxField DataField="Complete" HeaderText="Complete" SortExpression="Complete" />
               <asp:TemplateField HeaderText="DateStarted" SortExpression="DateStarted">
                  <EditItemTemplate>
                     <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DateStarted") %>'></asp:TextBox>
                     <atlas:PopupControlExtender ID="pce1" runat="server" PopupControlID="Panel1" Position="right"
                        TargetControlID="TextBox1" />
                     <asp:Panel ID="Panel1" runat="server">
                        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#3366CC"
                           CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
                           ForeColor="#003399" Height="200px" Width="220px" BorderWidth="1px" OnSelectionChanged="Calendar1_SelectionChanged">
                           <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                           <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                           <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                           <WeekendDayStyle BackColor="#CCCCFF" />
                           <OtherMonthDayStyle ForeColor="#999999" />
                           <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                           <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                           <TitleStyle BackColor="#003399" BorderColor="#3366CC" Font-Bold="True" BorderWidth="1px"
                              Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
                        </asp:Calendar>
                     </asp:Panel>
                  </EditItemTemplate>
                  <ItemTemplate>
                     <asp:Label ID="Label1" runat="server" Text='<%# Bind("DateStarted") %>'></asp:Label>
                  </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="DateFinished" SortExpression="DateFinished">
                  <EditItemTemplate>
                     <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("DateFinished") %>'></asp:TextBox>
                  </EditItemTemplate>
                  <ItemTemplate>
                     <asp:Label ID="Label2" runat="server" Text='<%# Bind("DateFinished") %>'></asp:Label>
                  </ItemTemplate>
               </asp:TemplateField>
            </Columns>
         </asp:GridView>

5 Items, 1 Pages |< << Go >> >|



Free Download:






   
  Privacy | Contact Us
All Times Are GMT