gridView删除提示框
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                gridView删除提示框
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                
                            
                            
                            實(shí)現(xiàn)方法:
雙擊GridView的OnRowDataBound事件;
在后臺(tái)的GridView1_RowDataBound()方法添加代碼,最后代碼如下所示:protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e){//如果是綁定數(shù)據(jù)行 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('你確認(rèn)要?jiǎng)h除:\"" + e.Row.Cells[1].Text + "\"嗎?')");}} }  
                        
                        
                        ?
轉(zhuǎn)載于:https://www.cnblogs.com/qqhfeng/p/4218568.html
總結(jié)
以上是生活随笔為你收集整理的gridView删除提示框的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: C语言基础:C语言宏定义(4) - 多文
- 下一篇: (转)双系统卸载Ubuntu
