加载时默认选中GridView的第一行
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//绑定表格
BindGridView();
//构造
CommandEventArgs cm=new CommandEventArgs("choose",(gvChoosedMemberList.Rows[0].FindControl("lbtnMemberChoose") as LinkButton).CommandArgument);
GridViewCommandEventArgs arg=new GridViewCommandEventArgs(gvChoosedMemberList.Rows[0],cm);
gvChoosedMemberList_RowCommand(null, arg);
}
}
{
if (!IsPostBack)
{
//绑定表格
BindGridView();
//构造
CommandEventArgs cm=new CommandEventArgs("choose",(gvChoosedMemberList.Rows[0].FindControl("lbtnMemberChoose") as LinkButton).CommandArgument);
GridViewCommandEventArgs arg=new GridViewCommandEventArgs(gvChoosedMemberList.Rows[0],cm);
gvChoosedMemberList_RowCommand(null, arg);
}
}