|
|
 |
| 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.
|
 |

June 30th, 2009, 12:53 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 153
Thanks: 7
Thanked 1 Time in 1 Post
|
|
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.
|

June 30th, 2009, 03:57 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 803
Thanks: 12
Thanked 139 Times in 139 Posts
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |