Hello,
In infragistics of version 6.1 I used public and not static field UltraGridExcelExporter.ExcelRelevantPropFlags for manage of style excel document.
But now this field is changed to constant.
Could you recommend me the way, I should use to ignore some properties (those are in enum AppearancePropFlags) of appearance for export UltraGrid to excel?
Roman
Hello Roman,
We have cheeked the code of UltraGridExcelExporter back to 2004th and ExcelRelevantPropFlags was always defined as “public const AppearancePropFlags ExcelRelevantPropFlags”. So if you use it as a property I assume that you have rebuild our source make this constant as a public property. Meanswhile as a workaround we could suggest you to handle BeginExport event and use the e.Layout property of the argument (it returns you cloning of grid layout which will be used for exporting) and to reset needed appearance.
Please let me know if you have any further questions.
It seems you are right.
Explain please how exactly I can ignore properties from AppearancePropFlags using event BeginExport and property e.Layout. I also tried event InitializeColumn:
var data = new AppearanceData();var flags = ~AppearancePropFlags.TextHAlign;e.Column.CellAppearance.MergeData(ref data, ref flags);e.Column.CellAppearance = new Appearance(ref data);
It is strange, e.Column.CellAppearance.TextHAlign is set to value Default
but anyway properties don't ignored in excel file.
Thank you,