none
Print/Preview grid details RRS feed

  • Question

  • HI all,

    I am using c sharp and I have a grid with Company details. When the user click the preview button I want to preview my grid details with some header captions. Is it possible to do this? simillarly I want to print the grid details also. Please help

    Wednesday, May 4, 2011 7:12 AM

Answers

All replies

  • This is what you need exactly.

    http://www.codeproject.com/KB/printing/PrintingOfDataGridView.aspx


    Please mark this post as answer if it solved your problem. Happy Programming!
    • Marked as answer by Paul Zhou Saturday, May 7, 2011 3:00 AM
    Wednesday, May 4, 2011 7:39 AM
  • Hi Adavesh,

    Thank you for the link provided. I will try with that code and inform you if I fall in trouble.

    Regards

    Wednesday, May 4, 2011 8:10 AM
  •  

    Hi,

     

    I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?

     

    If you have got answers, please remember to mark answer and close this thread.

     

    Have a nice day!

     


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Creative_Pro Friday, May 6, 2011 11:11 AM
    Friday, May 6, 2011 6:51 AM
  • hi Adavesh,

    In this coding example, I just try to preview the grid. I add the following code snippet,

     PrintPreviewDialog objPPdialog = new PrintPreviewDialog();         
    objPPdialog.Document = printDocument2;
    objPPdialog.ShowDialog();

    But this only show the preview dialog screen. data are not shown. Could you please help?

    regards

     

    Sunday, May 8, 2011 7:36 AM