Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / C#

DataGridView Print/Print Preview Solution - Part II

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
18 Jun 2009CPOL4 min read 77.5K   7.3K   47  
This article is the second one of two articles in which I want to show a solution for the Print Preview of the DataGridView object. One of the goals of my solution is to print the DataGridView keeping its styles automatically.
namespace GridPrintPreviewLib
{
    partial class frmSettingFitDialog
    {
        /// <summary>
        /// Variabile di progettazione necessaria.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Liberare le risorse in uso.
        /// </summary>
        /// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Codice generato da Progettazione Windows Form

        /// <summary>
        /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
        /// il contenuto del metodo con l'editor di codice.
        /// </summary>
        private void InitializeComponent()
        {
            this.glFitSettings1 = new GridPrintPreviewLib.GLFitSettings();
            this.SuspendLayout();
            // 
            // glFitSettings1
            // 
            this.glFitSettings1.HorizontalPage = 1;
            this.glFitSettings1.Location = new System.Drawing.Point(0, 0);
            this.glFitSettings1.Name = "glFitSettings1";
            this.glFitSettings1.Size = new System.Drawing.Size(154, 129);
            this.glFitSettings1.TabIndex = 1;
            this.glFitSettings1.VerticalPage = 1;
            // 
            // frmSettingFitDialog
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.ClientSize = new System.Drawing.Size(162, 158);
            this.Controls.Add(this.glFitSettings1);
            this.Name = "frmSettingFitDialog";
            this.Text = "Fit Settings";
            this.Controls.SetChildIndex(this.glFitSettings1, 0);
            this.ResumeLayout(false);

        }

        #endregion

        private GLFitSettings glFitSettings1;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader Mediatech Solutions
Italy Italy
I’m an IT Project Manager for an Italian Betting Company and over the last 2 years I acquired experience in Betting area.
I have developed code in different object oriented languages (C#, C++, Java) for more than 10 years using a set of technology such as .Net, J2EE, multithreading, etc…

Comments and Discussions