New Product Launch - BoldDesk !
Introducing help desk ticketing software.
New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
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