摘要: GridView技巧篇一2009-08-20 11:021.为对象添加样式(例:遍历所有单元格添加属性) foreach(TableCell tc in e.Row.Cells)//RowDataBound事件内写 { tc.Attributes.Add("style","border-color:Black") //添加边框颜色 }2.为GridView指定顺序编号. if(e.Row.RowIndex != -1)//RowDataBound事件内写 { int id=e.Row.RowIndex+1; //若分页,则int id=GridView1 阅读全文
posted @ 2011-10-11 14:11 windback 阅读(218) 评论(0) 推荐(0)