Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

GRIDVIEW ROW EDIT POP UP CALENDER

Posted on 2011-02-15
8
Medium Priority
?
1,262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 total points
ID: 34914466
Did you try the code from link?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

609 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