using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class d24 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState == DataControlRowState.Normal || e.Row.RowState == DataControlRowState.Alternate)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button btn = new Button();
btn.ID = "button1";
btn.Text = "自訂編輯按鈕";
btn.CommandName = "Edit";
PlaceHolder ph = e.Row.FindControl("PlaceHolder1") as PlaceHolder;
ph.Controls.Add(btn);
}
}
}
}
全站熱搜
留言列表