您的位置:首页 > 运维架构 > Linux

Linux下很全面的监控工具dstat

2013-02-18 14:53 501 查看
利用sql 表中的标识字段作为键码,该值总是递增的。

在GRIDVIEW的ROWDATABOUND事件中获取改标识字段的值,可以得到最新添加的记录标识

protected void gvsbls_RowDataBound(object sender, GridViewRowEventArgs e)

{

string str1;

int tmpflag = 0;

if (e.Row.RowType == DataControlRowType.DataRow)

{//空记录时不能设置

Button btnHiddenPostButton2 = e.Row.FindControl("btn2") as Button;

if (btnHiddenPostButton2 != null)

{

str1 = btnHiddenPostButton2.ClientID;

e.Row.Attributes[" = String.Format("javascript:document.getElementById('{0}').click()", btnHiddenPostButton2.ClientID);

// 额外样式定义

e.Row.Attributes[" = "javascript:this.style.background='yellow'";

e.Row.Attributes[" = "javascript:this.style.background=''";

e.Row.Attributes["style"] = "cursor:pointer";

e.Row.Attributes["title"] = "单击当前记录可查看批复结果";

tmpflag = Convert.ToInt16(e.Row.Cells[11].Text);

if (tmpflag > maxflag) maxflag = tmpflag;

}

// 若希望将隐藏按钮单独放于一列,则设置此列隐藏,占位符 <cellIndex> 表示此列索引

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: