Hi,
Is there a easy way to export the styles I have applied to CellValuePresenter to Excel?
I have applied quite a lot of conditional style to different cells, including font bold, font color, cell backgroud color, and tooltip. It would be great to have a generic way to handle this exporting logic.
Regards,
Jason
Hello Jason,
Thank you for your post. I have been looking into it and I suggest you see this forum thread:
http://blogs.infragistics.com/forums/t/31555.aspx
where a similar issue like yours is discussed. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan, thanks for your reply. That doesn't work for me because I have to apply style based on certain condition to a cell, but not the whole field.
Now I am trying to do my logic in OnCellExporting event, but I am having problem to set the cell background color there. How can a set the cell background in this event? There is FillPatternBackgroundColor but no Background property.
Hello Jason
After some research, Exporting to Excel with Styles has been determined to be a new feature request. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is FR14078.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Hi Stefan,
Thanks for your sample. My conditions is more complicated, which involve accessing the Data bound object and look up for child rows. Also I am looking for a way to reuse the conditional formatting logic that I have already implemented in the CellValuePresenter style.
Now in the CellExporting event, I end up reading all the properties in the CellValuePresenter style and saving it in a collection object. After the excel file is created, I reopen it using Office Excel library to apply whatever style I need to apply. It's not a good approach, but at least I can set the background cell now. It would be great if Infragistics control can just persist all the appearance, including alternating color and specify row color, to the excel.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I have created a sample project for you in which I handled the CellExporting event and in it I made a conditional formatting, which is applied to the Excel’s Sheet. I set the Background, but you can set the Foreground, FontStyle etc. Please let me know if this helps you or you need further assistance on this matter.
I can see that example in FeatureBrowser using ExcelCellFormatSettings in FieldSettings property, but how can I apply conditional formatting from there?
I can set the FillPattern to 75%, but that doesn't look good compare to a simple Background property..