Hello Simon,
There are quite a few good examples on this topic. Here are some links for
your reference:
Top Questions About the DataGrid Web Server Control
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar
t/html/vbtchtopquestionsaboutaspnetdatagridservercontrol.asp
Contents
Windows Forms versus Web Forms DataGrid Controls
Controlling Column Width, Height, and Alignment
Customizing Column Layout in Display and Edit Mode
Formatting Dates, Currency, and Other Data
Showing and Hiding Columns Dynamically
Adding Columns Dynamically
Adding New Records to a Data Source Using the DataGrid Control
Displaying a Drop-Down List in Edit Mode
Selecting Multiple Items Using a Check Box (Hotmail Model)
Editing Multiple Rows At Once
Selecting Rows by Clicking Anywhere
Cutting Edge: Server-side ASP.NET Data Binding, Part 2: Customizing
the DataGrid Control
http://msdn.microsoft.com/library/en-us/dnmag01/html/cutting0104.asp
Summary Rows in DataGrid Controls
http://msdn.microsoft.com/library/en-us/dndive/html/data01102002.asp
Cutting Edge: Custom Web Data Reporting
http://msdn.microsoft.com/library/en-us/dnmag01/html/cutting0107.asp
Cutting Edge: A Truly Excel-like Grid Control
http://msdn.microsoft.com/library/en-us/dndive/html/data02142002.asp
Hope it helps.
Best regards,
yhhuang
VS.NET, Visual C++
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net?
http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Simon" <
[email protected]>
!Sender: "Simon" <
[email protected]>
!Subject: web datagrid
!Date: Tue, 8 Jul 2003 03:33:07 -0700
!Lines: 23
!Message-ID: <
[email protected]>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!Thread-Index: AcNFPFIjgGRHPKQUQ1aVN9GgBSkWmg==
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Newsgroups: microsoft.public.dotnet.general
!Path: cpmsftngxa09.phx.gbl
!Xref: cpmsftngxa09.phx.gbl microsoft.public.dotnet.general:14935
!NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
!X-Tomcat-NG: microsoft.public.dotnet.general
!
!Can any one please tell me how to set the width of my
!datagrid coloums after I have put them into edit mode?
!
!At the moment I bind the datagrid to a returning dataset;
!
!DataGrid1.DataSource = f.GetData("storedprocedure")
!DataGrid1.DataBind()
!
!This populates my datagrid.
!
!I then press the 'edit' button, which is added to each row
!of the dg.
!
!The page postsbacks then returns with editable text
!boxes.. cool.
!
!But they are huge and make my datagrid to big for the page.
!
!Any ideas on how to achieve reducing them?
!
!Many Thanks
!
!Simon
!