Hi,
I have a grid and the grid has colored rows to differentiate. I have hidden the grid and use excel exporter to export to excel. It exports the data correctly and i get the colors in the excel also which is what i want.
However i need a legend just above the header to color a cell and say what it means. Can it be done using any event of excel exporter ? or is there any other way to do it?
Thanks,
Sure. Use the BeginExport event. The event will pass in the WorkSheet that the grid is being exported to. So you can set values or apply styles to any cells you like. Then you just have to update the CurrentRowIndex property on the event args so that the grid export start below the rows you used.
I had a go at it Mike. The CurrentRowIndex is reset to 0 and doesn't show me anything whatever text i'm setting in the cells. I had to increment the row index for Header (HeaderRowExpoting)as well as grid Rows(RowExporting) to get what i want.
Thanks Mike.