467,075 Members | 1,126 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,075 developers. It's quick & easy.

counting the number of columns in a data grid

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?
Jul 21 '05 #1
  • viewed: 2217
Share:
1 Reply
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?

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by pmud | last post: by
reply views Thread by javatopia | last post: by
5 posts views Thread by Gary Blakely | last post: by
10 posts views Thread by Aaron Smith | last post: by
1 post views Thread by Brian Anderson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.