Hi Seema,
I looked at your other post, but I'm still not sure how removing headers from the export would help you achieve this. It looks like what you want is to export the grid to Excel as though the grid's ViewStyle were horizontal. But I don't think the exporter supports that. You'd almost have to write your own exporter to modify the export in such a drastic way.
But, just in case I am still not understanding what you want, you can use the HeaderRowExporting event to cancel the exporting of an entire header row.All you have to do is set e.Cancel to true. You can also skip a cell using HeaderCellExporting. Notice that you have to use the "ing" event, which occurs before the object is exporting, you can't use the "ed" event, which occurs after.
You can also change e.CurrentColumnIndex and/or e.CurrentRowIndex in any of the exporting/exported events in order to reposition objects within the excel sheet. So maybe you could achieve what you want that way, but I think it would be extraordinarily complicated if I understand what you want.
hi,
Its a header that is present which i want to delete.
Please refer my post
http://ko.infragistics.com/community/forums/p/26042/417386.aspx#417386
I have specified that the headers are repeated , i want to either stop them from being printed or remove them from excel sheet.
Please provide me a sample to achieve this.
Thanks ,
Seema Sharma
Hi,
I'm not sure I understand what you want. When you "delete a row", do you mean you want to delete a row from the grid? Or do you just want to skip exporting that row?
Either way, why would you use HeaderCellExported event? This event fires for the column headers and has no associated row, so what row would you be deleting? Or do you mean you want to skip exporting the headers?