See attached sample - it loads an excel file in GridDesktop in read only mode (using version 25.2).
GridDesktopTest.zip (12.6 KB)
I observe three issues:
Issue 1:
Though the grid is in read only mode, a “Convert to number” popup is shown for some cells which contain number-only strings:
Clicking it changes “something”.
I would expect the grid not to show this popup in read only mode.
Issue 2:
Click e.g. cell C2 (autofilter cell) => it crashes with this exception:
HResult=0x80131600
Message=Cell has been removed: C17
Source=Aspose.Cells.GridDesktop
StackTrace:
at .()
at .()
at .e()
at Aspose.Cells.GridDesktop.RowFilterSettings.( , Int32 , Int32 )
at Aspose.Cells.GridDesktop.RowFilterSettings.(Int32 )
at Aspose.Cells.GridDesktop.Worksheet.(Int32 , Int32 )
at Aspose.Cells.GridDesktop.GridDesktop.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
at Windows.Win32.PInvoke.DispatchMessage(MSG* lpMsg)
at System.Windows.Forms.Application.ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at GridDesktopTest.Program.Main() in E:\Projekte\Temp\GridDesktopTest\Program.cs:line 14
The sample file defines a filter range from A2 to E17. If I apply the filter only to A2 to E2, the empty rows make the filter range end before them in Excel.
Issue 3:
Click Cell A2 and try to open the AutoFilter popup => nothing happens. But if you click another cell now, this error happens:
System.IndexOutOfRangeException
HResult=0x80131508
Message=Index was outside the bounds of the array.
Source=Aspose.Cells.GridDesktop
StackTrace:
at .e(Int32 , Boolean , Boolean )
at .( , Int32 , Int32 , Int32 , Int32 , Boolean , )
at .( )
at Aspose.Cells.GridDesktop.GridDesktop.( , Int32 , Int32 , Int32 , Int32 , Int32 , Int32 , Int32 , Int32& )
at Aspose.Cells.GridDesktop.GridDesktop.OnPaint(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.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
Initially, my question arose with version 24.12 that we use in our real product, and here I did not observe the crashes (but with my sample, they also happen with the old version). So my initial question was “does filtering work also in readonly mode?”. But while creating a sample for this, I noticed the other problems. So I don’t know whether filtering is just blocked by those crashes, or whether it really is not supported in read only mode? I would expect it to work anyway - what do you think?