If this is a bound table, you can use DataTable.Columns.Count
"Brian Anderson" <br***********@yahoo.com> wrote in message
news:12****************************@phx.gbl...
Hello,
I am creating a windows application with a data grid
contained on it. I want to find out the number of columns
contained in the data grid at runtime, but I am not sure
how to do this. I know that when using ASP.NET the data
grid control has a class called datagrid.columns.count
that does this, however the windows data grid control does
not have this class. Could anyone help with this?