A
Alan Z. Scharf
1. Is it possible to define an "OnDoubleClick" event attribute for a
datagrid item?
2. I have code below which selects a datagrid row with the "OnClick"
attribute, but apparently there is no built-in OnDoubleClick attribute.
Thanks.
Alan
Code - Using Datagrid Item OnClick Attribute
------------------------------------------------------
public void dgHoldings_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
ListItemType itemType = e.Item.ItemType;
if( (itemType == ListItemType.Item) || (itemType ==
ListItemType.AlternatingItem) )
{
LinkButton linkButton = (LinkButton) e.Item.Cells[7].Controls[0];
e.Item.Attributes["OnClick"] = Page.GetPostBackClientHyperlink(linkButton, "
");
}
else
{
return;
}
}
--
___________________________
Alan Z. Scharf
GrapeVine Systems
New York City
datagrid item?
2. I have code below which selects a datagrid row with the "OnClick"
attribute, but apparently there is no built-in OnDoubleClick attribute.
Thanks.
Alan
Code - Using Datagrid Item OnClick Attribute
------------------------------------------------------
public void dgHoldings_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
ListItemType itemType = e.Item.ItemType;
if( (itemType == ListItemType.Item) || (itemType ==
ListItemType.AlternatingItem) )
{
LinkButton linkButton = (LinkButton) e.Item.Cells[7].Controls[0];
e.Item.Attributes["OnClick"] = Page.GetPostBackClientHyperlink(linkButton, "
");
}
else
{
return;
}
}
--
___________________________
Alan Z. Scharf
GrapeVine Systems
New York City