I expected that setting the width of all IGridColumns of an IGrid to Infragistics.Documents.Report.AutoWidth.Instance would size the column widths according to the contained text. But it appears to render no differently than if I set all columns to the same relative width. There appears to be no IGrid property to get the columns after all the rows are added in case the 'AutoWidth' needs to be set for a column after the cell text is added. So is AutoWidth supposed to function?
I'm not entirely sure, but in my experience, AutoWidth is not related to the contents of the object it's related to the parent of that object. So it basically fills the remaining space in the parent object, I think.
I could be wrong about that, but I am fairly certain there is no way to measure text or the contents of a column and auto-size the width built-in to the Documents engine. What the UltraGridDocumentExporter does is measure the contents of the strings as they would be on-screen, and then gets that width and uses the PixelsToPoints method.
Mike, I appreciate your response. I was simply thiking that the AutoSize behavior worked as it was documented. According to the documentation, the Width property of the IGridColumn "Gets or sets the width of the column." and of the 4 types of objects it can take, the AutoSize setting is documented as "Represents a dynamic width. This class allows to set the width of an element according to its content". Since the width of the IGridColumn applies to the entire column, would have expected the behavior to autosize the column based on the contents of the cells in that column. I guess the documentation is wrong.