Current filter:
                                You should refresh the page.
                                  • Hi

                                    I want to show multiple line page header like

                                    ABC Company (abc@gmail.com)
                                    Full Address
                                    Phone number

                                    Is that possible to add this header in export file.
                                    I am using this code to export grid data.

                                            //Export to Excel
                                            settings.SettingsExport.FileName = "Banks" + " " + DateTime.Now;
                                            settings.SettingsExport.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
                                            settings.SettingsExport.EnableClientSideExportAPI = true;
                                            settings.SettingsExport.ExcelExportMode = DevExpress.Export.ExportType.WYSIWYG;
                                            settings.SettingsExport.PageHeader.VerticalAlignment = DevExpress.XtraPrinting.BrickAlignment.None;
                                            var society = HttpContext.Current.Session["SocietyInfo"];
                                            if (society != null)
                                            {
                                                var data = (HAIS.Trucking.Models.SocietyModel)society;
                                                var email = $"'('{data.VendorCode}')('{data.Email}')'{data.URL}";
                                                var numbers = $"'(GST No:'{data.GSTNumber}')(PAN No:'{data.PANNumber}')(Phone No:'{data.PhoneNumber}";
                                                settings.SettingsExport.PageHeader.Left = $"{data.Name}";
                                                 settings.SettingsExport.PageHeader.Center = email;
                                                 settings.SettingsExport.PageHeader.Right= numbers;
                                            }
                                            settings.SettingsExport.PageHeader.Font.Bold = true;
                                    //settings.SettingsExport.PageHeader.Font.Size = new FontUnit(FontSize.Large);
                                    settings.SettingsExport.PageHeader.Font.Name = "Calibri";
                                            settings.Toolbars.Add(t =>
                                            {
                                                t.EnableAdaptivity = true;
                                                t.Position = GridToolbarPosition.Top;
                                                t.ItemAlign = GridToolbarItemAlign.Right;
                                                t.Items.Add(GridViewToolbarCommand.ExportToPdf);
                                                t.Items.Add(GridViewToolbarCommand.ExportToXlsx);
                                            });
                                            settings.SettingsExport.RenderBrick = (sender, e) =>
                                            {
                                                settings.SettingsExport.EnableClientSideExportAPI = true;
                                                settings.SettingsExport.PaperKind = System.Drawing.Printing.PaperKind.A4Rotated;
                                                if (e.RowType == GridViewRowType.Data && e.VisibleIndex % 2 == 0)
                                                    e.BrickStyle.BackColor = System.Drawing.Color.FromArgb(0xEE, 0xEE, 0xEE);
                                            };
                                        });

                                    This is not showing as I want please help me.

                                    Regards

                                    Ashish

                                • Oleg (DevExpress Support) 10.22.2019

                                  Hello Ashish,
                                  I created a sample project based on the code snippet you provided, but did not encounter the issue you mentioned. Please check how the attached sample operates on your side.

                                  If this sample works correctly, please add required modifications to it so that it can be used to reproduce the issue and send it back to me.

                                  I will investigate it and do my best to assist you.

                                • Ashish Bhardwaj 2 10.22.2019

                                  Thank you so much .working :-)

                                • Oleg (DevExpress Support) 10.23.2019

                                  You are welcome, Ashish!
                                  Do not hesitate to contact us if you have additional questions or need further assistance.

                                0 Solutions

                                Creation Date Importance Sort by