Re: [問題] gridview資料無法更新

看板C_Sharp (C#)作者時間14年前 (2011/05/14 09:18), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
從藍色小舖的小喵得到解答: 在以下語法內,加入if判斷式即可 : protected void gv_Main_Class_RowDataBound(object sender, : GridViewRowEventArgs e) : { : if (e.Row.RowType == DataControlRowType.DataRow) : { : LinkButton d_button = (LinkButton)e.Row.Cells[0].FindControl("LinkButton4"); : Label ltext = (Label)e.Row.Cells[1].FindControl("Label1"); if ((d_button != null)) { : d_button.OnClientClick = "return confirm('再一次確認,您確定要對 : 類別名稱-- " + ltext.Text + " 的資料,進行處置動作嗎?')"; } : } : } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 116.118.161.39
文章代碼(AID): #1DpTXLFr (C_Sharp)
文章代碼(AID): #1DpTXLFr (C_Sharp)