Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
UltraWinGrid Export Error
posted

Hello. I have several grids bound to various different datasources, all of which use the Excel exporting functionality. However, one of the grids encounters an error every time I try to perform an Excel export. For this particular grid, it is bound directly to a typed DataTable in a typed DataSet, without a BindingSource. There is one unbound column in the grid. Below is the exception:

 

System.ArgumentException: Key already exists
Parameter name: Key
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKeyDoesNotExist(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key, IKeyedSubObject ignoreObject)
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.ValidateKey(String key)
   at Infragistics.Shared.KeyedSubObjectsCollectionBase.InternalAdd(IKeyedSubObject obj)
   at Infragistics.Win.UltraWinGrid.ColumnsCollection.InternalAdd(UltraGridColumn column)
   at Infragistics.Win.UltraWinGrid.UltraGridBand.InitColumns(UltraGridBand[] oldBands)
   at Infragistics.Win.UltraWinGrid.UltraGridBand.InitListManager(BindingManagerBase bindingManager, String dataMember, UltraGridBand[] oldBands)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated(BindingManagerBase bindingManager)
   at Infragistics.Win.UltraWinGrid.UltraGridLayout.ListManagerUpdated()
   at Infragistics.Win.UltraWinGrid.UltraGrid.Export(IUltraGridExporter exporter)
   at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.Export(UltraGrid grid, Worksheet worksheet, Int32 startRow, Int32 startColumn)
   at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter.Export(UltraGrid grid, Workbook workbook)
   at MyApp.WinForms.Controls.BaseControl.ExportGrid(UltraGrid grid, String title, String initDirectory, Boolean promptToOpen) in D:\Development\MyApp\MyApp.WinForms\Controls\BaseControl.cs:line 882

 

I am using Infragistics v10.2. Any insight or help you can provide would be greatly appreciated.

Thanks!

Parents Reply Children
No Data