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

解决方案 »

  1.   

    3、datagrid有个AllowCustomPaging属性,请参阅SDK的文档。
      

  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()+"'");