文件名称:C# datagridview 动态加载
文件大小:635B
文件格式:CS
更新时间:2012-03-13 03:12:51
graidview动态加载
动态加载gridview里面的列. //动态生GridView protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { switch (e.Row.RowType) { //判断是否表头 case DataControlRowType.Header: //第一行表头 TableCellCollection tcHeader = e.Row.Cells; tcHeader.Clear(); tcHeader.Add(new TableHeaderCell()); //tcHeader[0].Attributes.Add("bgcolor", "Azure");