Re: [問題] gridview資料無法更新
從藍色小舖的小喵得到解答:
在以下語法內,加入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
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章