GridView is a databound control. Once you have a 20x30 datasource,
databinding it to a gridview will produce a 20x30 grid.
Most common datasources are SqlDataSource, DataTable and SqlDataReader.

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Hi,
>
[quoted text clipped - 5 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
> How can I create a grid of 20 Columns by 30 Rows using asp.net?
By "grid" presumably you mean an <asp:GridView /> webcontrol?
If so, then its geometry is (generally speaking) defined by the data which
is bound to it.
I.e. you can set its AutoGenerateColumns property to true and, assuming its
underlying datasource has 20 columns, you'll get a grid with 20 columns.
Alternatively, you can set its AutoGenerateColumns property to false, in
which case you define the columns yourself. If you define 20 columns, you'll
get a grid with 20 columns.
As regards rows, if you set the AllowPaging propery to true and set the
PageSize property to "30", you'll get a grid with 30 rows provided that the
underlying datasource contains at least 30 rows of data...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net