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. popup calendar in datagrid

popup calendar in datagrid

Scheduled Pinned Locked Moved ASP.NET
javascripttutorial
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.
  • N Offline
    N Offline
    neoms21
    wrote on last edited by
    #1

    hi all, i have atextbox and a hyperlink to popup a calendar so that a date chosen displayed in textbox.this way it works in simple page.but how to pass the id of a textbox to the javascript function which is popping the calendar from the datagrid.please let me know. if there is any ohter way yhen also please tell me. thanking in anticipation, neoms21

    A 1 Reply Last reply
    0
    • N neoms21

      hi all, i have atextbox and a hyperlink to popup a calendar so that a date chosen displayed in textbox.this way it works in simple page.but how to pass the id of a textbox to the javascript function which is popping the calendar from the datagrid.please let me know. if there is any ohter way yhen also please tell me. thanking in anticipation, neoms21

      A Offline
      A Offline
      Anish Gopi
      wrote on last edited by
      #2

      Use the data grid Item Bound

      private void dgSubCategories_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
      {
      ListItemType itemType = (ListItemType) e.Item.ItemType;

      		if (itemType = ListItemType.ITEM || itemType = ListItemType.ALTERNATEITEM)
      		{
      			
      			TextBox txtBox = (TextBox)  e.Item.FindControl("txtBox"); // txtBox is the name of the textbox
      			string id =  txtBox.ClientID; // Which is ur Textbox Client ID
      			
      			
      
      		}			
      
      	}
      

      to do the Attribute rendering to the Hyperlink use _control_.Attributes.Add(key,value)

      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