Using ASP.NET Web Forms.
I am databinding a DataView to a DataGrid with AutoGenerateColumns set to true.
The final column of the DataView is not rendering.
Using the debugger I can see that the column definitely exists in the data grid's datasource. The column is of type decimal and some of the rows in the column have data in them. The column has a column name.
The other columns are rendering fine.
What's going on?
Some more info
Funnily enough, I can set AutoGenerateColumns to false, then just add the columns manually:
datagrid.Columns.Clear();
foreach(DataColumn column in dataView.Table.Columns)
{
datagrid.Columns.Add(new BoundColumn {
HeaderText = column.ColumnName });
}
datagrid.DataSource = dataView;
This works fine. Why can't .NET do this with AutoGenerateColumns?