With version 8.2 of the control set, if you exported a grid that had an image type in it, it would export to excel and in the image cell you would see the text.. System.Drawing.BitMap
which was fine.
after upgrading the controlset to 9.2 the same code now blows errors..
I have proven it is an issue with the 9.2 control set, i have submitted a support ticket.
what i am trying to do to get around it is:
on the CellExporting event, it the type of field is a bitmap, then I want to skip exporting it.
Can someone assist on what code i might use?
Hi,
First off... I just tested this out and it works fine for me. Not only does it now blow up, it actually exports the image, now. So maybe you just need to get the latest service release.
How to get the latest service release - Infragistics Community
Anyway, if that does not help for some reason, then your suggested workaround sound like a good one.And the code is really very simple.
private void ultraGridExcelExporter1_CellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs e) { if (e.GridColumn.DataType == typeof(Bitmap)) e.Cancel = true; }
thanks Mike.
I did figure that one out and included it.
Now this leads me down the path of WHY I can't export an image to excel.
I also am having the same problem with the ultraprintpreview control, IT also blows up when I click on a print button.
Private
UltraButton1.Click
Try
.UltraPrintPreviewDialog1.ShowDialog() <---- errors out here...
Exception
Publish(ex)
Sub
Oddly enough it doens't blow up when i use the same software with the 8.2 controlset..
Did you get the latest service release as I suggested above?
yes Mike, I downloaded and install the 1/29/2010 updates for both winforms and aspnet, ran both installs, then rebuilt control tabs using the utility. Oddly enough, during runtime, after i compile and install, i don't get the error and the images show up in printpreview, but running the app in the dev environment blows up even though i have try..catch.. it actually shows as an error on the line of code i mentioned, BUT, the error is inside the control itself, on my computer it shows the error line in green(for me) it means it the last viewable(code debug) that it can show.
If you are only getting an exception in Debug mode, then perhaps this is a FirstChance exception that is being caught and handled internally and you are only seeing it because you have set Visual Studio to break on all exceptions.
That's the only possible explanation I can think of for why you would be getting exceptions when you are wrapping your code in a try...catch.