//不显示表头设置
gridView1.OptionsView.ShowGroupPanel = false;
gridView1.OptionsView.ShowColumnHeaders = false;
//如果打印预览的话(支持多组件打印)
PrintingSystem printingSystem1 = new PrintingSystem();
printingSystem1.StartPrint += new DevExpress.XtraPrinting.PrintDocumentEventHandler(PrintingSystem_StartPrint);
PrintableComponentLink printableComponentLink1 = new PrintableComponentLink();
printingSystem1.Links.AddRange(new object[] { printableComponentLink1 });
// Assign a control to be printed by this link.
gridView1.OptionsView.ShowColumnHeaders = false;
//gridControl1.Views[0].op
printableComponentLink1.Component = gridControl1;
printableComponentLink1.Landscape = true;
//printableComponentLink1.CreateMarginalHeaderArea += new CreateAreaEventHandler(myEvent_CreateMarginalHeaderArea);
//显示打印预览
//printableComponentLink1.ShowPreview();
CompositeLink compositeLink = new CompositeLink(new PrintingSystem());
compositeLink.CreateMarginalHeaderArea += new CreateAreaEventHandler(myEvent_CreateMarginalHeaderArea);
compositeLink.CreateReportHeaderArea += new CreateAreaEventHandler(myEvent_CreateReportHeaderArea);
compositeLink.Links.Add(printableComponentLink1);
compositeLink.ShowPreview();
//gridControl在打印预览时,如果不需要显示列名
进入设计器Run Designer并且在OptionsPrint组属性中设置PrintDetails = True, PrintHeader = False
这样打印出来就不会显示列名了。