private void btnYazdır_Click(object sender, EventArgs e)
        {
            int height = dataGridView1.Height;

            dataGridView1.Height = dataGridView1.RowCount * dataGridView1.RowTemplate.Height * 2;
            bmp = new Bitmap(dataGridView1.Width, dataGridView1.Height);
            dataGridView1.DrawToBitmap(bmp, new Rectangle(0, 0, dataGridView1.Width, dataGridView1.Height));
            dataGridView1.Height = height;
            PpdDialog.ShowDialog();
        }
Example #2
0
 private void btnYazdir_Click(object sender, EventArgs e)
 {
     try
     {
         int height = dgwRapor.Height;
         dgwRapor.Height = dgwRapor.RowCount * dgwRapor.RowTemplate.Height * 2;
         bmp             = new Bitmap(dgwRapor.Width, dgwRapor.Height);
         dgwRapor.DrawToBitmap(bmp, new Rectangle(0, 0, dgwRapor.Width, dgwRapor.Height));
         dgwRapor.Height = height;
         PpdDialog.ShowDialog();
     }
     catch
     {
         MessageBox.Show("Hata Oluştu...");
     }
 }