Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid Calendar

Status
Not open for further replies.

LeoLionHeart

Programmer
Apr 4, 2006
45
GB
Hi there does anyone know or have an example of placing a image in a template column in a datagrid and then this image clicking and turning into a popup calendar. Then the date from the calendar going back into the data grid.

I'm using vb and javascript. Any examples would be fantastic.
 
Which bit of the above are you struggling with? What have you got so far?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I can display the calendar control such as

Code:
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="..." CausesValidation="false"
CommandName="Select"></asp:Button>

Public Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Response.Write("<Script Language=JScript>window.open('Date.aspx','mywindow','width=260,height=250');</Script>")
End Sub


Private Sub DG_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DGCourse.SelectedIndexChanged
        
Dim RowIndex As Integer = Me.DGCourse.SelectedIndex
Me.txtTest.Text = RowIndex
Session("RowIndex") = RowIndex

So I have placed RowIndex intp txtTest and into a session variable.

When the other page, calendar loads (Date.aspx) I don't know what to do?

Any ideas?
 
You'll have to use a JavaScript function to populate the relevant TextBox (I think it's the window.opener method in JavaScript that will allow you to get a reference to the page that opened the pop-up).

As a side note, use ClientScript.RegisterClientScriptBlock or ClientScript.RegisterStartUpScript instead of Response.Write to register any JavaScript.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top