BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void button2_Click(object sender, System.EventArgs e) { //selected if (this.gridDataBoundGrid1 != null) { if(this.gridDataBoundGrid1.Selections.Count == 0) { MessageBox.Show("Select some cells first."); return; } GridRangeInfoList rangeList = new GridRangeInfoList(); foreach(GridRangeInfo range in this.gridDataBoundGrid1.Selections) { if(!range.IsCells) rangeList.Add(range.ExpandRange(1, 0, this.gridDataBoundGrid1.Model.RowCount, this.gridDataBoundGrid1.Model.ColCount) ); else rangeList.Add((GridRangeInfo)range.Clone()); } this.gridDataBoundGrid1.Selections.Clear(false); foreach(GridRangeInfo range in rangeList) this.gridDataBoundGrid1.Selections.Add(range); GridPrintDocument pd = new GridPrintDocument(this.gridDataBoundGrid1, true); pd.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.Selection; PrintPreviewDialog dlg = new PrintPreviewDialog() ; dlg.Document = pd; dlg.ShowDialog(); } } private void button3_Click(object sender, System.EventArgs e) { if (this.gridDataBoundGrid1 != null) { GridPrintDocument pd = new GridPrintDocument(this.gridDataBoundGrid1); PrintDialog dlg = new PrintDialog() ; dlg.Document = pd; dlg.AllowSomePages = true; if(dlg.ShowDialog() == DialogResult.OK) { pd.Print(); } } }