gridView 삭제 프롬프트 상자

1545 단어 GridView
    :

  GridView OnRowDataBound  ;

    GridView1_RowDataBound()      ,        :



    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

    {

        //         

        if (e.Row.RowType == DataControlRowType.DataRow)

        {

             if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate)

            {

                ((LinkButton)e.Row.Cells[6].Controls[0]).Attributes.Add("onclick", "javascript:return confirm('      :\"" + e.Row.Cells[1].Text + "\" ?')");

            }

        } 



    }

좋은 웹페이지 즐겨찾기