?
Solved

GRIDVIEW ROW EDIT POP UP CALENDER

Posted on 2011-02-15
8
Medium Priority
?
1,261 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
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.

 
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

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!

Question has a verified solution.

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

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

752 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