By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

web datagrid

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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/de...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...utting0104.asp

Summary Rows in DataGrid Controls
http://msdn.microsoft.com/library/en...ta01102002.asp

Cutting Edge: Custom Web Data Reporting
http://msdn.microsoft.com/library/en...utting0107.asp

Cutting Edge: A Truly Excel-like Grid Control
http://msdn.microsoft.com/library/en...ta02142002.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" <si*************@world-flowers.co.uk>
!Sender: "Simon" <si*************@world-flowers.co.uk>
!Subject: web datagrid
!Date: Tue, 8 Jul 2003 03:33:07 -0700
!Lines: 23
!Message-ID: <85****************************@phx.gbl>
!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
!

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.