1.
2.private void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item ||e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover","this.runtimeStyle.backgroundColor='#ADC3E7'");
e.Item.Attributes.Add("onmouseout","this.runtimeStyle.backgroundColor=''");
e.Item.Attributes.Add("ondblclick","window.location='aa.aspx?id=" + this.DataGrid1.DataKeys[e.Item.ItemIndex].ToString()+"'");
}
}
3.http://community.csdn.net/Expert/topic/2956/2956737.xml?temp=.7143671
{
if(e.Item.ItemType == ListItemType.Item ||e.Item.ItemType == ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover","this.runtimeStyle.backgroundColor='#ADC3E7'");
e.Item.Attributes.Add("onmouseout","this.runtimeStyle.backgroundColor=''");
e.Item.Attributes.Add("ondblclick","window.location='aa.aspx?id=" + this.DataGrid1.DataKeys[e.Item.ItemIndex].ToString()+"'");