摘要: protected void GvFloorList_RowDataBound(object sender, GridViewRowEventArgs e)//该方法一定要启用RowDataBound事件 { if (e.Row.RowType == DataControlRowType.DataRow) { //当鼠标停留时更改背景色 e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#bcdbec';&quo 阅读全文
posted @ 2011-07-29 11:30 haiziguo 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 在GridView中还是经常会遇到导出Excel,现在把导出gridView数据代码记录下来,仅供参考 如果有更好的方法,也可以交流一、先建一个类,其中的一个方法为ToExcel。代码如下 public static void ToExcel(Control ctl, string FileName) { HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.Buffer = t... 阅读全文
posted @ 2011-07-29 11:06 haiziguo 阅读(249) 评论(0) 推荐(0) 编辑