I have a column that contains formatted text (.Style = UltraWinGrid.ColumnStyle.FormattedText). The text contains a graphic and some text in bold. When I export the grid using the Ultragrid.ExcelExporter I do not get the graphic or bold text. I get what dispays below which is the text equivalent.
How do I get the Graphic and Bold Text to display in the Excel Cell? Thanks.
_ _2014/03/21 Notification of Receipt of Application - 60 Clock Start Due Date 2014/05/20<br/><img style="width:16px; height:16px;" data="AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJhd2luZy5CaXRtYXABAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA5wAAAAKJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAABc1JHQgCuzhzpAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAHxJREFUOE+1k00KACEIhT2FK1fe/45ONgj9qDUMLiQo/Hw+DURA/kTLLgQgolhEhVwFlgTwqtOTiDpsBW2ArKL35gIyX5h5UjEBtILJDntu7YytbICbqdQCTi2sRn42cR2lC4hU6P0RoCa683aS+5JFro9rnC1X7We62YkHYz6ybWpisLcAAAAASUVORK5CYIILAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="/>2014/04/23 Notification - Application Incomplete - Time Suspension Begins - <b>34 Days Elapsed </b><br/>
Hello Bob,
Thank you for following up. Don't hesitate to ask any additional questions. Have a great day.
That answers a few questions I had since I have another column that has images attached to the valuelist that displays again great on the grid but nothing is exported for that column either.
Thank You for the answer. I'll tap into the cellexport event and adjust the text from there and maybe put the grahic in a separate column such that I can change the datatype to image. I should be able get what I want with a few adjustments.
Excel doesn't provide any support for displaying both an image and text in the same cell that I am aware of. Therefore our exporter doesn't include this ability. However the exporter will export images from a cell whose DataTpe is Image (or Bitmap).
Excel also does not include support for formatted text. The UltraGrid exports the cell's value. You should be able to override the cell data to make sure what you need is bold in Excel by handling the UltraGridExcelExporter events. eg. CellExported.
Inside that event you can modify the current worksheet's cellFormat.Font.Bold property explained here:
http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/?page=Infragistics4.Win.UltraWinGrid.ExcelExport.v14.1~Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter~CellExported_EV.html
private void CellExportedEH(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportedEventArgs e) { if(e.CurrentColumnIndex%2==0) { IWorksheetCellFormat tmCF = e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].CellFormat; tmCF.Font.Bold = ExcelDefaultableBoolean.True
} }