473,800 Members | 2,741 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Hi,

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

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #1
2 1546
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.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Claudia Fong" <cd********@yah oo.co.ukwrote in message
news:ep******** ******@TK2MSFTN GP06.phx.gbl...
Hi,

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

Cheers!

Claudi

*** Sent via Developersdex http://www.developersdex.com ***

Jun 27 '08 #2
"Claudia Fong" <cd********@yah oo.co.ukwrote in message
news:ep******** ******@TK2MSFTN GP06.phx.gbl...
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 AutoGenerateCol umns property to true and, assuming its
underlying datasource has 20 columns, you'll get a grid with 20 columns.
Alternatively, you can set its AutoGenerateCol umns 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...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5190
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no SQL query processor for DataSets. You can use XPath with an XMLDataDocument built from the DataSet. You can also perform selections based on criteria, using the Find and Select methods, and you can create row filters using DataViews."
1
1526
by: Sergiu Cojocaru | last post by:
Ia have a query that returns a variable number of columns. How can I create these columns in Crystal?
1
1677
by: Phil | last post by:
I would like to be able to display multiple fields per record over two rows using the vb.net datagrid as follows Name | Address | Phone | Comments | (ie comments on the second row but within the same record.) Is this posible? How can you do this? Any pointers or suggestions would be greatly apprieciated.
0
1121
by: neo | last post by:
I am working on vs2k5. I made MFC-SDI application and view class inherited from CListView. I was tried a lot to bold one row in List using custom drawing but I was able not understand, how to use custom drawing. I was changed text color of one row using custom drawing, and following code written for NM_CUSTOMDRAW message void CTestView::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult) {
3
1897
by: khairulfnd | last post by:
i want to select multiple rows using a checkbox in a gridview in which it will be posted in another gridview
0
1424
by: hafeez | last post by:
Hi, I have two mssql databases. I am able to create a linked server. I want to delete some of the rows using this linked server. Here HAFEEZ is one mssql database and DPVSQSL is another.So, i want to delete rows from DPVSQL from HAFEEZ using HAFEEZDPVSQL linkedserver. DELETE OPENQUERY (HAFEEZTODPVSQL, 'SELECT EVENT_SYS_ID FROM DIS_MEASMT_FTR_ACTUAL WHERE EVENT_SYS_ID = ''evesysid0015'''); when i run the query i got the following error.
4
15426
by: =?Utf-8?B?Sm9zaW4gSm9obg==?= | last post by:
I could create MS Excel sheet using ASP.NET 2.0 with C# but it is not being created in some systems, following error occurs when the program compiles : Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need.
0
1036
by: mohit818 | last post by:
how to perform updation in xml through grid view without using any id of text box
1
1721
by: manj jain | last post by:
how to fill data grid with dataset using javascript.
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10250
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.