Hello,
I am using Infragistics 13.1 under Win7.
I need to export a WinGrid into a spreadsheet, and I am using UltraGridExcelExporter to do that.
My WinGrid's cells have multiline comments that are formatted to look like little tables. These comments list the data that went into calculating each cell's value.
It looks perfect in WinGrid, but when I export it into Excel using UltraGridExcelExporter, the Comment size is too small to fit the text, the text gets wrapped, tabulation breaks, and it becomes unusable.
Is there a way for me to define the size of the comment in the WorksheetCellComment object that I am using to export comments?
Thank you in advance for your help.
-Helen
Hi Jose,
I have figured it out while waiting for your reply.
I used the SetBoundsInTwips property to control comment size. In case someone else needs it, here is the code:
'based on http://ko.infragistics.com/community/forums/p/75179/382543.aspx
Dim GridCell_ToolTipText As FormattedString = New FormattedString(ugProj.Rows(e.GridRow.Index).Cells(e.GridColumn.Index).ToolTipText)
Dim xlsCell_CommentObject As WorksheetCellComment = New WorksheetCellComment()
xlsCell_CommentObject.Text = GridCell_ToolTipText
xlsCell_CommentObject.SetBoundsInTwips(e.CurrentWorksheet, New Rectangle(0, 0, 4000, 1000))
e.CurrentWorksheet.Rows(e.CurrentRowIndex).SetCellComment(e.CurrentColumnIndex, xlsCell_CommentObject)
Hello Helen,
I will be happy to assist you.
May I ask if you can provide me with more detail and/or screenshots of what you are referring to with the WinGrid? Are you exporting your Grid data using the ExcelExporter and modifying the file with our Excel engine to add comments?
The Infragistics Excel Engine adds comments to cell that appear like in the screenshot in the link below:http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/InfragisticsExcelEngine_Add_a_Comment_to_a_Cell.html
With more information, I will be able to investigate you inquiry further and provide you with a possible solution.