How to prevent print when display data Exist on datatable using printpreview dialog and print document ?
private void button1_Click(object sender, EventArgs e) { PrintDocument document = new PrintDocument(); document.PrintPage += new PrintPageEventHandler(document_PrintPage); PrintPreviewDialog ppDialog = new PrintPreviewDialog(); ((ToolStripButton)((ToolStrip)ppDialog.Controls[1]).Items[0]).Enabled = false; ppDialog.Document = document; ppDialog.Show(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)