"Select$"表示进入行的选择状态,也可将其改为"Update$"、"Edit$"等其他事件。
protected override void Render(HtmlTextWriter writer)
    {
        
foreach (GridViewRow Row in GridView1.Rows)
        {
            
if (Row.RowType == DataControlRowType.DataRow)
            {
                Row.Attributes[
"ondblclick"= ClientScript.GetPostBackEventReference(GridView1, "Select$" + Row.RowIndex.ToString(), true);
                Row.Attributes[
"style"= "cursor:pointer";
                Row.Attributes[
"title"= "双击选择行";
            }
        }
        
base.Render(writer);
    }

相关文章:

  • 2022-01-23
  • 2022-03-05
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
猜你喜欢
  • 2021-09-29
  • 2021-07-13
  • 2022-01-24
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案