Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem in date picker in edit template of the gridview

Problem in date picker in edit template of the gridview

Scheduled Pinned Locked Moved ASP.NET
javatoolshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rockyl
    wrote on last edited by
    #1

    Hi In edit mode of the gridview, I have provide date picker. For this I am opening a new page containing the calender using java script: window.open('CalendarPopUp.aspx?textbox=tbxSetDate','cal','width=250,height=225,left=270,top=180') But I am unable to take the selected date back to the parent page. When I am trying to access the textbox of the current row in gridview's rowcommand like: TextBox tbxSetDate= (TextBox)(GridView2.Rows[Int32.Parse(e.CommandArgument.ToString())].Cells[2].FindControl("TextBox2")); I am getting null instead of the textbox object. Any idea here? Regards, Rocky

    Rakesh

    B 1 Reply Last reply
    0
    • R rockyl

      Hi In edit mode of the gridview, I have provide date picker. For this I am opening a new page containing the calender using java script: window.open('CalendarPopUp.aspx?textbox=tbxSetDate','cal','width=250,height=225,left=270,top=180') But I am unable to take the selected date back to the parent page. When I am trying to access the textbox of the current row in gridview's rowcommand like: TextBox tbxSetDate= (TextBox)(GridView2.Rows[Int32.Parse(e.CommandArgument.ToString())].Cells[2].FindControl("TextBox2")); I am getting null instead of the textbox object. Any idea here? Regards, Rocky

      Rakesh

      B Offline
      B Offline
      blooper02
      wrote on last edited by
      #2

      Hi Rakesh, When you go into edit mode the e.CommandArgument is not working some of the times. Therefore it is likely you cannot find your textbox in that row. I use the following to get the correct row number. GridViewRow row = (GridViewRow)((Control)e.CommandSource).Parent.Parent you can try it and see. regards blooper

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups