protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{ if (e.Row.RowType == DataControlRowType.Header)
{
return;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{ }
PostBackOptions pb = new PostBackOptions(this); pb.AutoPostBack = false;
pb.RequiresJavaScriptProtocol = true;
pb.PerformValidation = false;
String Evt = Page.ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex.ToString()); e.Row.Attributes.Add("Onclick", Evt); e.Row.Attributes["Style"] = "Cursor:hand";
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
int UserID = Convert.ToInt16(GridView1.SelectedRow.Cells[0].Text); DataTable dt = GetUserInfo(UserID); this.txtName.Text = dt.Rows[0]["Name"].ToString(); this.txtUsername.Text = dt.Rows[0]["UserName"].ToString(); this.txtPassword.Text = dt.Rows[0]["PassWord"].ToString();
}
{ if (e.Row.RowType == DataControlRowType.Header)
{
return;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{ }
PostBackOptions pb = new PostBackOptions(this); pb.AutoPostBack = false;
pb.RequiresJavaScriptProtocol = true;
pb.PerformValidation = false;
String Evt = Page.ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex.ToString()); e.Row.Attributes.Add("Onclick", Evt); e.Row.Attributes["Style"] = "Cursor:hand";
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
int UserID = Convert.ToInt16(GridView1.SelectedRow.Cells[0].Text); DataTable dt = GetUserInfo(UserID); this.txtName.Text = dt.Rows[0]["Name"].ToString(); this.txtUsername.Text = dt.Rows[0]["UserName"].ToString(); this.txtPassword.Text = dt.Rows[0]["PassWord"].ToString();
}
解决方案 »
- c#如何对mysql数据库进行备份和恢复
- C#遍历本地文件和文件夹内的mp3文件
- 如何让滚动条获取焦点?
- 关于绘图,请问有没有更简便的方法
- 置顶
- 请问Connection.connectionString连接字符串中的password='sa'在第一个DLL中密码还存在再第二个DLl中就消失了,为什么?
- 请问如何计算用户在线时长,当用户在线时长大于24小时积分就加2
- 求:用C#如何实现windows下运行unix服务器的c程序,并且显示程序的输出呢?
- 字符替换的问题
- 那有C#2003中文版下载,50分相送!!!!!!!
- VS2005打包发布的问题
- C#在 Window Mobile 下如何实现TraceRoute
{ if (e.Row.RowType == DataControlRowType.Header)
{
return;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{ }
PostBackOptions pb = new PostBackOptions(this); pb.AutoPostBack = false;
pb.RequiresJavaScriptProtocol = true;
pb.PerformValidation = false;
String Evt = Page.ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex.ToString()); e.Row.Attributes.Add("Onclick", Evt); e.Row.Attributes["Style"] = "Cursor:hand";
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
int UserID = Convert.ToInt16(GridView1.SelectedRow.Cells[0].Text); DataTable dt = GetUserInfo(UserID); this.txtName.Text = dt.Rows[0]["Name"].ToString(); this.txtUsername.Text = dt.Rows[0]["UserName"].ToString(); this.txtPassword.Text = dt.Rows[0]["PassWord"].ToString();
}
{ if (e.Row.RowType == DataControlRowType.Header)
{
return;
}
if (e.Row.RowType == DataControlRowType.DataRow)
{ }
PostBackOptions pb = new PostBackOptions(this); pb.AutoPostBack = false;
pb.RequiresJavaScriptProtocol = true;
pb.PerformValidation = false;
String Evt = Page.ClientScript.GetPostBackClientHyperlink(this.GridView1, "Select$" + e.Row.RowIndex.ToString()); e.Row.Attributes.Add("Onclick", Evt); e.Row.Attributes["Style"] = "Cursor:hand";
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
int UserID = Convert.ToInt16(GridView1.SelectedRow.Cells[0].Text); DataTable dt = GetUserInfo(UserID); this.txtName.Text = dt.Rows[0]["Name"].ToString(); this.txtUsername.Text = dt.Rows[0]["UserName"].ToString(); this.txtPassword.Text = dt.Rows[0]["PassWord"].ToString();
}
private void DGV_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
{ }
else
{
String ID = this.DGV.Rows[e.RowIndex].Cells[0].Value.ToString();//获得本行第一个单元格的数据,以此类推
}
}
private void DGV_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
{ }
else
{
String ID = this.DGV.Rows[e.RowIndex].Cells[0].Value.ToString();//获得本行第一个单元格的数据,以此类推
}
}
private void DGV_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
{ }
else
{
String ID = this.DGV.Rows[e.RowIndex].Cells[0].Value.ToString();//获得本行第一个单元格的数据,以此类推
}
}