Solved

GRIDVIEW ROW EDIT POP UP CALENDER

Posted on 2011-02-15
8
1,258 Views
Last Modified: 2012-06-27
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
Comment
Question by:BOEING39
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 34903973
Whn u place controls inside gridview it's clientid would change. So the datepicker is nt able 2 get d id of textbox.
0
 
LVL 20

Expert Comment

by:informaniac
ID: 34903981
So in RowDatabound event of gridview u need 2 assign the proper textbox client id to the datepicker.
0
 

Author Comment

by:BOEING39
ID: 34904036
Ok that makes sense.  Can you provide me an example?
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 34904134
0
 
LVL 20

Expert Comment

by:informaniac
ID: 34904309

<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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34906079
0
 

Author Comment

by:BOEING39
ID: 34913000
Yes the data is a pop up calender control
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34914466
Did you try the code from link?
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question