Calendar in DataGrid Nightmare

W

walterd

Hi

I need help. I have a datagrid that's populated from a dataset.
I have created a calendar.aspx page that hosts the calendar control.
In the datagrid, i have a HyperLink that is invoke the Pop-up Calendar.aspx
page that will
update a field on the datagrid.
I have no other buttons on the datagrid save the editable textboxes.

My problem is, the HyperLink does not respond to any click event.
I have wasted too much time trying to get this to work. The calendar is a
requirement.
PLEASE HELP!!!
 
S

Scott M.

You are using the Server hyperlink control or the client control. Client
will only respond in client side code via the onClick event handler.
 
W

walterd

I am using the Server HyperLink control because I want to get the UniqueID
of the date textbox within the DataGrid.
If you can show me how to invoke this in Client side, that will be great.
I am using the code as below:

Private Sub dgUpdateDate_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dtgOrders.ItemDataBound

If e.Item.ItemType = ListItemType.EditItem Then
Dim textDate As String =
e.Item.Cells(0).FindControl("txtDate").ClientID()
CType(e.Item.FindControl("lbtnCalendar"), HyperLink).NavigateUrl =
"javascript:calendar_window=window.open('Calendar.aspx?formname=Form1." &
textDate &
"','DatePicker','width=250,height=190,left=360,top=180');calendar_window.foc
us();"
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top