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