p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2009, 12:53 PM
bex bex is offline
Friend of Wrox
Points: 643, Level: 9
Points: 643, Level: 9 Points: 643, Level: 9 Points: 643, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 153
Thanks: 7
Thanked 1 Time in 1 Post
Default Printing DataGridView in VB 2008

Hi

I am going round and round the DataGridView trying to print the Datat it contains.

I maneged to print the row Numbers, the string name, tru values , false values... but not what i need.
Code:
PrivateSub PrintDocument1_PrintPage(ByVal sender AsObject, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
 
' create a new font to print with...
Dim fnt AsNew Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Point)
' print the text from the text box...
e.Graphics.DrawString(DataGridViewSearch.Rows.Count, fnt, Brushes.Black, 0, 0)
' end printing by indicating there are no more pages...
e.HasMorePages = False
EndSub
as you can see here DataGridViewSearch.Rows.Count is printing the number of rows,

Is there another property that prints the data...

Or Can i disply the same data in RichTextBox,?
__________________
bx

Last edited by bex : June 30th, 2009 at 01:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old June 30th, 2009, 03:57 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,237, Level: 27
Points: 4,237, Level: 27 Points: 4,237, Level: 27 Points: 4,237, Level: 27
Activity: 48%
Activity: 48% Activity: 48% Activity: 48%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 803
Thanks: 12
Thanked 139 Times in 139 Posts
Default

Since this appears to be a Windows Forms question, you might get a quicker answer posting this question to a WinForms forum rather than an ASP.NET forum.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning VB 2008 mhccStudent Visual Basic 2008 Essentials 1 September 22nd, 2009 07:06 PM
VB.NET 2003 Appendix B convert to VB 2008 Express Edition brucechess BOOK: Beginning VB.NET Databases 10 February 5th, 2009 12:52 PM
Printing from VB 2008 BroadwayLion Visual Basic 2008 Essentials 1 September 27th, 2008 01:02 PM
why buy vs-2008 instead of vb-2008 jerryham VB.NET 7 September 2nd, 2008 03:39 PM
How do I write this vb 6 code to work in vb 2008? sanderson Visual Basic 2008 Essentials 3 June 10th, 2008 02:46 PM



All times are GMT -4. The time now is 01:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc