Crash when confirm filter
When press ok button,I got the following crash.
After filling in the table data, I use the following code to set the FilterRange.
// set filter
if (worksheet.AutoFilters.FilterRange != null)
{
worksheet.AutoFilters.FilterRange = null;
}
var filterRange = worksheet.Range[Const.TitleRowCount, 1, newMaxRow, lastMaxColumn];
filterRange.NumberFormat = "@";
worksheet.AutoFilters.FilterRange = filterRange;
Am I doing this correctly?
Based on the information provided, we understand that an exception is being encountered when filtering data in SfSpreadsheet. We have developed a simple sample to attempt to replicate the issue, but we were unable to reproduce the problem on our end, as the SfSpreadsheet displayed correctly without any exceptions.
2. Video or Screenshots: If possible, please share a video or screenshots demonstrating the issue.
This information will help us better understand the problem and work towards finding a solution promptly. Thank you for your cooperation.
Malini Selvarasu
I made a simple demo with recording.
First, there is a high probability of a crash even during the first filtering.
Second, after resetting the data and setting the FilterRange, the does not refresh.
Attachment: CrashDemo_db391fe8.zip
Thank you for sharing the demo. We have successfully replicated the issue on our end. After analyzing the problem, we suspect it might be a bug. To further investigate, we need to examine it at the source level. Consequently, we will need some additional time for validation and will provide an update by October 04, 2024.
Hi crosslife,
Malini Selvarasu
Unfortunately, we were unable to include the fix for the issue of “An IndexOutOfRange Exception being thrown while filtering the data without a selection in SfSpreadsheet” in the NuGet package released today, as promised.
Due to the 2024 Volume 3 SP release, there is no weekly NuGet release this week. Unfortunately, we were unable to include a fix for the issue, "An IndexOutOfRangeException is thrown while filtering data without a selection in SfSpreadsheet" in our upcoming 2024 Volume 3 SP release.
As mentioned earlier, during the testing phase, we identified an issue where the current cell does not update as expected. We are currently addressing this and will implement a fix in our first weekly NuGet release following the 2024 Volume 3 SP release.
Hi crosslife,
We regret the inconvenience caused. Unfortunately, we were unable to include the fix for the issue of "An IndexOutOfRange Exception being thrown while filtering the data without a selection in SfSpreadsheet" in the NuGet package released today, as promised.
As mentioned earlier, this issue occurs because the selection is cleared at the sample level before performing programmatic filtering. If the selection is not cleared, the exception will not occur. We are actively working on implementing a default range selection when the selection is cleared. These changes will be included in our weekly NuGet release, scheduled for November 26, 2024.
In the meantime, we recommend filtering the data without clearing the selection during the button click, as the selected range is required for filtering in the spreadsheet.
We will notify you as soon as the release is available. We appreciate your patience and understanding. Thank you for your cooperation.
Regards,
Malini Selvarasu
We would like to let you know that Essential Studio Weekly NuGet packages (v27.2.4) has been published in nuget.org with the fix for the issue “An IndexOutOfRange Exception being thrown while filtering the data without a selection in SfSpreadsheet”. Please let us know if you have any concerns in this.
Root Cause:
We have accessed the selected range for redo or undo operations, but when we perform a programmatic selection, the selected ranges are empty, which leads to the reported issue. To fix this, we now use FirstOrDefault() from a LINQ query instead of index-based access.
Regards,
- 9 Replies
- 2 Participants
-
CR crosslife
- Sep 25, 2024 10:02 AM UTC
- Nov 26, 2024 01:11 PM UTC