foreach (DataColumn cCol in dsReports.Tables[0].Columns) { dgReport.Columns.Add(CreateBoundColumn(cCol)); }
private BoundColumn CreateBoundColumn(DataColumn dcol) { BoundColumn bcol = new BoundColumn(); bcol.DataField = dcol.ColumnName; bcol.HeaderText = resource.GetString(dcol.ColumnName); bcol.DataFormatString = "{0}"; return bcol; }
1-4 5-10 11-20
4-Jan 10-May 20-Nov
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)