Hello;
My grid has 1 group by and the group by header row is suppressed with this property: (HeaderPlacement.FixedOnTop). But when I export the grid, the .the header row in the group by shows back up, even though it doesn't appear in the grid. (BTW, this also shifts the summary values in the groupby rows over a column in the .xls, so they stay aligned with the column headers in the groupby. I think. The groupby column headers are shifted over one relative to the main grid column header.)
That's my first question, but I went ahead to see if I could cancel the export of the header row in the HeaderRowExporting event but I could never find the right header row. The event fired 3 times, all for band[0] and all were columnHeqaderTypes. I'm stuck.
Thanks,
Bill
The same question was discussed in this thread: UltraGridExcelExporter GroupBy mode Fixed Header - Infragistics Community
Thanks Mike, moveing from 8.1 to 8.3 fixed the shifted column issue. But is it expected that the .xls has the groupby column headers when the grid doesn't. (The top column headers appear in both.)
I'm still not able to eliminate the columns header row in the group by with code in the HeaderRowExporting event.
Will do.. That's 2 sample apps I owe you. Crunch time right now unfortunately.
Ok, I got a little to cobble up a simple app and here are 2 screen shots:
The Grid:
The .xls:
See how the groupby header row show in the spreadsheet? Is that normal? I couldn't find a way to prevent it from exporting in code.
Hi Bill,
I'm not sure what you are indicating here. Yes, I do see the GroupByRow in the exported Excel sheet. But I don't see anything wrong with it. Is there something I am missing here?
The grid is exported WYSIWYG. So the export looks as much like the grid on-screen as possible. So the group by rows are exported intentionally, if that's what you mean.
I'm not sure what behavior you are looking for. You could handle the RowExporting event and cancel the export of the GroupByRow, but then that would just leave an empty space, and that doesn't make much sense.
If you want to export the grid ungrouped, then you could handle the BeginExport event and modify the Layout which is passed into the event through the event args. This is a clone of the on-screen grid's Layout, so you can safely modify it and it will affect the export without affecting the on-screen grid. All you would have to do is clear the band's SortedColumns collection.
Hi Mike;
It's just the header rows I'm talking about.
I was referring to the header row of the group by. The grid doesn't have a header row in the groupby; just at the top of the grid. But the .xls has no header row at the top of the sheet but it has a header row in each group by.
Does that make sense or am I missing something? Maybe I'm using the wrong terminology. Or maybe that's just the the export works, which as far as I can tell, isn't WYSIWYG in terms of the way the header rows exported.
Thanks, Bill
Oh, I see it now. You are talking about the column headers. I'm not sure if this is intentional or not. But it looks wrong to me. I recommend that you Submit an incident to Infragistics Developer Support.
If possible, include a small sample project demonstrating the issue so they can check it out.