BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
GridControlBase grid = groupingGrid.TableControl;
if (grid != null)
{
try
{
GridPrintDocument pd = new GridPrintDocument(grid); //Assumes the default printer
if (PrinterSettings.storedPageSettings != null)
{
pd.DefaultPageSettings = PrinterSettings.storedPageSettings ;
}
PrintDialog dlg = new PrintDialog() ;
dlg.Document = pd;
dlg.AllowSelection = true;
dlg.AllowSomePages = true;
DialogResult result = dlg.ShowDialog();
if (result == DialogResult.OK)
{
pd.Print();
}
}
catch(Exception ex)
{
MessageBox.Show("An error occurred attempting to preview the file to print - " + ex.Message);
}
}
To hide the insert row, you can groupingGrid.TableDescriptor.AllowNew = false;
Thanks for your interest.
Stefan