• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1263
  • Last Modified:

GRIDVIEW ROW EDIT POP UP CALENDER

I placed a gridview date changer in the template field for the Date selection as per below.   The calender graphic shows and I can select the date; however, it does populate the textbox.   Any assistance would be appreciated
withe the proper placement of the code.
<asp:templatefield HeaderText="Date" SortExpression="Dates">
	<EditItemTemplate>
	<asp:TextBox runat="server" Text='<%# Bind("Dates", "{0:MM/dd/yyyy}") %>' id="TextBox2">
	</asp:TextBox>

	<a href="javascript:;" onclick="window.open('popup.aspx? Textbox=TextBox2','cal','width=250,height=225,left=270,top=180')">
	<img src="SmallCalendar.gif" border="0" width="16" height="16"></img></a>
			
	</EditItemTemplate>
	<ItemTemplate>
	<asp:Label runat="server" Text='<%# Bind("Dates", "{0:MM/dd/yyyy}") %>' id="Label8">
	</asp:Label>
						
	</ItemTemplate>
	<HeaderStyle HorizontalAlign="Center" Wrap="False" Width="55px" />
	<ItemStyle HorizontalAlign="Center" Wrap="False" Width="55px" />
			</asp:templatefield>

Open in new window

0
BOEING39
Asked:
BOEING39
  • 3
  • 2
  • 2
  • +1
1 Solution
 
informaniacCommented:
Whn u place controls inside gridview it's clientid would change. So the datepicker is nt able 2 get d id of textbox.
0
 
informaniacCommented:
So in RowDatabound event of gridview u need 2 assign the proper textbox client id to the datepicker.
0
 
BOEING39Author Commented:
Ok that makes sense.  Can you provide me an example?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
0
 
informaniacCommented:

<a href="javascript:;" id="a1" runat="server" >
	<img src="SmallCalendar.gif" border="0" width="16" height="16"></img></a>

Textbox txt = e.Row.FindControl("t") as Textbox;
HtmlGenericControl a = e.row.FindControl("a1") as HtmlGenericControl;
a.Attributes.add(window...

Open in new window

0
 
CodeCruiserCommented:
0
 
BOEING39Author Commented:
Yes the data is a pop up calender control
0
 
CodeCruiserCommented:
Did you try the code from link?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now