0

I have a TCxGrid (DevExpress) with a TCxGridDBBandedTableView. This view has 2 bands, and each band has its columns.

I use the ExportGridToExcel (from DevExpress's cxGridExportLink unit), to expot the grid to excel. Example:

Grid Configuration

  • Band 1:
  • => Column A
  • => Column B
  • Band 2:
  • => Column A
  • => Column B
  • => Column C

How the excel is being generated:

  • Column A (content of Band 1: Column A)
  • Column B (content of Band 1: Column B)
  • Column C (empty content, because here is where second band begins)
  • Column D (content of Band 2: Column A)
  • Column E (content of Band 2: Column B)
  • Column F (content of Band 2: Column C)

How I would like it to be:

  • Column A (content of Band 1: Column A)
  • Column B (content of Band 1: Column B)
  • Column C (content of Band 2: Column A)
  • Column D (content of Band 2: Column B)
  • Column E (content of Band 2: Column C)

Is there a way I could configure it not to consider "bands separators" as empty columns when generating excel?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Alisson Reinaldo Silva
  • 10,009
  • 5
  • 65
  • 83
  • 1
    Developer express are usually really quick and good with their support so that would probably be the best place to ask for help (https://www.devexpress.com/Support/Center/). You can also search there for old tickets. A question that sounds similar to yours had the following as a solution "As a workaround in your case you can set the TcxGridBandedTableView.OptionsView.FixedBandSeparatorWidth property to 0." – Graymatter Apr 01 '15 at 20:18
  • Thanks in advance, I submitted a [Ticket](https://www.devexpress.com/Support/Center/Question/Details/T226593), if they give me a solution, I post here. Otherwise, you could put this workaround as an answer, since it gives me what I wanted. – Alisson Reinaldo Silva Apr 02 '15 at 13:48

1 Answers1

0

I figured out my mistake. The problem is that I had these 2 bands, and my second band had FixedKind defined with fkLeft. I changed it to fkNone, and edited his Position.ColIndex property to zero (because I wanted it to be the first band). Thanks!

Alisson Reinaldo Silva
  • 10,009
  • 5
  • 65
  • 83