We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Unhandled System.ArgumentException when trying to execute a spreadsheet refresh

The application loads different spreadsheets when date is changed.  I am able to reliably reproduce the argument exception when simply refreshing the spreadsheet.

Call Stack

  Message=Can't get token for specified grid
   at Syncfusion.Windows.Forms.Spreadsheet.Helpers.FormulaHelper.GetSheetToken(SpreadsheetGrid grid, Boolean canThrowException)
   at Syncfusion.Windows.Forms.Spreadsheet.Helpers.FormulaHelper.GetCellReference(SpreadsheetGrid grid, Int32 row, Int32 col)
   at Syncfusion.Windows.Forms.Spreadsheet.SpreadsheetColumn.OnUpdateColumn()
   at Syncfusion.Windows.Forms.CellGrid.GridRow.UpdateCells(Int32 rowIndex, VisibleLinesCollection visibleColumns)
   at Syncfusion.Windows.Forms.CellGrid.GridRow.UpdateCells()
   at Syncfusion.Windows.Forms.CellGrid.VisualContainer.EnsureRows(VisibleLinesCollection visibleRows)
   at Syncfusion.Windows.Forms.CellGrid.VisualContainer.EnsureItems(Boolean ensureColumns)
   at Syncfusion.Windows.Forms.CellGrid.VisualContainer.MeasureChildPanels(Size availableSize)
   at Syncfusion.Windows.Forms.Spreadsheet.VisualContainerExt.MeasureChildPanels(Size availableSize)
   at Syncfusion.Windows.Forms.CellGrid.VisualContainer.MeasureOverride(Size availableSize)
   at Syncfusion.Windows.Forms.CellGrid.VisualContainer.OnPaint(PaintEventArgs e)
   at Syncfusion.Windows.Forms.Spreadsheet.VisualContainerExt.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
   at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
   at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
   at System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent)
   at System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Syncfusion.Windows.Forms.CellGrid.ScrollableChildFrame.WndProc(Message& m)
   at Syncfusion.Windows.Forms.CellGrid.SelectionPanel.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Occurs on the line.


I have the repro project - PM for details.

Video Repro Scenario is attached.

PM For the original source code to repro the project or for me to grab more information.

Attachment: capture4_4c8c2f61.zip

7 Replies

AA Arulraj A Syncfusion Team February 21, 2019 12:24 PM UTC

Hi Spotty, 

Thanks for your update. 

We have tried to load different sheets using button click with Refresh method using Syncfusion product version But the sheets are imported properly without throwing any exception. So, please let us know your exact usage or let us know the below attached sample differ from your customization. It will be helpful for us to provide the solution at the earliest. 

Arulraj A 

SP Spotty February 21, 2019 04:06 PM UTC

As I had said please PM so I can provide a repro project.   This is material that I would not like to be made publicly available but would like to fix the problem.

AA Arulraj A Syncfusion Team February 22, 2019 04:43 PM UTC

Hi Spotty,   

Thanks for the update. 

Please mail your sample to support@syncfusion.com. We will check and update you. 

Arulraj A 

SP Spotty February 23, 2019 01:10 AM UTC

PM sent with repro project and repro steps.

SP Spotty February 26, 2019 12:43 AM UTC

If you did not download the files from the links provided in the Private Email I can PM with a new location.

MG Mohanraj Gunasekaran Syncfusion Team February 26, 2019 03:54 AM UTC

Hi Spotty, 

Thanks for your update. 

We have downloaded your sample from your provided link through our support mail and also, we can reproduce your reported scenario from your provided sample. We suspect that this is a bug. So, we have forwarded this query to our development team. So, we will check and update the details on 27th February 2019. 

Mohanraj G 

MG Mohanraj Gunasekaran Syncfusion Team March 1, 2019 04:38 AM UTC

Hi Spotty, 

Thanks for your patience. 

We have confirmed this is a bug so, we logged the bug report for this issue “System.ArgumentException occurs when trying to execute a spreadsheet refresh”. It will be available on our upcoming main release 2019 volume1 which will be expected at end of March 2019. 

Mohanraj G 

Live Chat Icon For mobile
Up arrow icon