GridDesktop: read only mode, exceptions with AutoFilter

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:

convert_to_number.png (19.2 KB)
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?

@wknauf
We can reproduce such issues.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-58027

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@wknauf,

We are pleased to inform you that your issue (Ticket ID: “CELLSNET-58027”) has been resolved. The fix will be included in our upcoming release (Aspose.Cells.GridDesktop v25.4) that we plan to release in the first half of April 2025. You will be notified when the next version is released.

The issues you have found earlier (filed as CELLSNET-58027) have been fixed in this update. This message was posted using Bugs notification tool by leoluo

Thanks a lot!

But still weird things are happening :wink:

Problem 1:
Filter col B and uncheck “107518”.
Now you can select cells in row 12, but not in row 14.
not_selectable_row.png (35.7 KB)

Problem 2:
Filter col B and uncheck “107518”. Select cell B12, then click cell B14 (which is not selectable, see before).
Then open filter for col B again and click “clear filter”.
Then open the filter again and uncheck “107518” again. Click OK => row 13 is still visible, though it does not match the filter.

Problem 3:
I still can reproduce the exception of issue 2 from my initial bug report.

Filter col B and uncheck “107518”.
Click cells B11, B12 and then try to click cell B14. It is only reproduceable if you perform exactly those steps, with other selections it works!
Now try to open the filter dropdown in col B => crash.


  HResult=0x80131600
  Message=Cell has been removed: B17
  Source=Aspose.Cells.GridDesktop
  StackTrace:
   at .()
   at .e()
   at Aspose.Cells.GridDesktop.RowFilterSettings.(e , 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


Best regards

Wolfgang

@wknauf
Apologies, we will reopen the previous ticket to further address this issue.

@wknauf,

Thanks for the screenshot and details.

After initial testing, I am able to reproduce/confirm all three problems you mentioned (by following your steps/sequence) using your original template Excel file with Aspose.Cells.GridDesktop v25.4. I noticed the issues regarding AutoFilters with read-only mode in Aspose.Cells.GridDesktop.

We require thorough evaluation of the problems you shared. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-58205

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I also observed the issue that the filter popup of col B showed a wrong entry sometimes. But I could not find a reliable way to reproduce it.

@wknauf,

We will make an effort to thoroughly investigate and figure out the issue regarding auto-filtering precisely. However, it would be greatly appreciated if you could kindly share the steps or process involved in replicating it on our end. Additionally, if possible, please provide a screenshot once you encounter this issue. Thank you for your cooperation.

Problem 4:
I can reproduce the issue “wrong entries in filter popup” with those steps:

  • open the filter popup in B2 and uncheck the item “107518” and click “OK”.
  • click cell B1 (above the filter range) - it is important to perform this seemingly pointless step :wink:
  • click cell B2 again and open the filter popup.

Now the filter contains an item “65345”, and another item has disappeared.

filter_2025-04-15.png (20.3 KB)

@wknauf,

Thanks for the details and screenshot.

I tested and after following your mentioned steps I found this problem (“wrong entries appear in filter popup”). I have logged it with your existing ticket “CELLSNET-58205” into our database. We will look into it as well.

@wknauf
please try this v25.4.1 update
we will publish the official release which include this fix in the next month.

Whow, that was fast! I can confirm that the new issues 1-4 are all fixed.

But I found a new one:
In the filter of col B, uncheck “Blanks” => two blank rows are still visible. And the grid selection is confused, as the blank rows are not selectable and selecting rows below them has an offset.

@wknauf
Thanks for your confirm.
We will check the issue about filtering blank rows soon.

@wknauf.

I tested your scenario using Aspose.Cells.GridDesktop v25.4.1 and confirmed the issue you mentioned regarding blanks handling during data filtering. We will work on the fix and appreciate your ongoing efforts with auto-filtering checking and testing. We apologize for any inconvenience this may have caused.

@wknauf,

Moreover, regarding issue when handling blanks and hidden rows in data filters, We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Support Policies

Issue ID(s): CELLSNET-58052

Once we resolve the issue or we have some other updates on it, we will let you know here.

@wknauf,

This is to inform you that your issue (Ticket ID: “CELLSNET-58052”) has been resolved. The fix/enhancement will be included in an upcoming release (Aspose.Cells.GridDesktop v25.5) that we plan to release in the first half of May 2025. You will be notified when the next version is released.

@wknauf
Please try this v25.4.2 update
we will publish the official release which include this fix in the next month.

@peter.zhou Perfect, it works fine now.

Best regards

Wolfgang

@wknauf,

Thank you for your feedback.

We’re glad to hear that Aspose.Cells.GridDesktop 25.4.2 (fix) has resolved your issue. If you have any more questions or comments, please don’t hesitate to reach out to us.