I have to believe this is a common request, but it is driving me crazy...
I have a grid, it is grouped by a column. When I export the grid to excel it puts the group by value in Column A and sets it width to the columns width. It then starts on the next row with the data rows. So when you look at the grid in excel you have a big column A and then your data is in column B and not under the group by column. Looks weird and I don't want my users to have to resize Column A everytime they open the spread sheet.
Ideally, I would like to merge the Cells in the group by row (just like it does it on the grid), in the Excel file. Failing that, at least set the width of column A to something small (like the indention width, and let Excel display over muliple cells if it has to.
Like I said, I'm sure I'm missing something because it does way to good of a job formating everything to not have consider what must be a pretty common occurance....
Hi,
If you want to stop the child rows from shifting over into column B, try this:
private void ultraGridExcelExporter1_BeginExport(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.BeginExportEventArgs e) { foreach (UltraGridBand band in e.Layout.Bands) { band.Indentation = 0; } }
Hi Mike,
In my grid, I have grouped based on one column and have included the sub totals at the group level and also have a grand total.
When I use the above code, all the rows except the grand total row is prevented from shifting to column B, but the grand total row still starts at column B. How do I prevent that ?
Thanks.