Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

How to create a grid of 20 Columns by 30 Rows using asp.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Claudia Fong - 21 May 2008 14:01 GMT
Hi,

How can I create a grid of 20 Columns by 30 Rows using asp.net?

Cheers!

   Claudi
Eliyahu Goldin - 21 May 2008 14:16 GMT
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 ***
Mark Rae [MVP] - 21 May 2008 14:24 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.