Hi,
I’ve been getting the error mentioned below when ever I create a new bind row using CreateNewBindRow() Method. Any ideas on what may be the reason for this problem.
The above error also occurs when I run the Aspose Demos, Aspose.Cells.GridWeb.Demos2010.
In the demo project I’ve updated the aspose dll’s to the latest version. I guess that’s when i started getting this error.
Aspose DLL Versions
Aspose.Cells: v7.2.1.0
Aspose.Cells.GridWeb: v2.7.6.2000
Please let me know if you need any further information.
Thanks,
Vijay
Unable to cast object of type 'Aspose.Cells.GridWeb.Validation' to type
'System.Collections.SortedList'.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.InvalidCastException: Unable to cast object of type
'Aspose.Cells.GridWeb.Validation' to type
'System.Collections.SortedList'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
[InvalidCastException: Unable to cast object of type 'Aspose.Cells.GridWeb.Validation' to type 'System.Collections.SortedList'.]
Aspose.Cells.GridWeb.Data.CellAttachObjectColletion.(Int32 , Int32 ) +130
Aspose.Cells.GridWeb.Data.Validations.(WebCell ) +46
Aspose.Cells.GridWeb.Data.WebCellImpl.get_Validation() +21
Aspose.Cells.GridWeb.GridWeb.() +16540
Aspose.Cells.GridWeb.GridWeb.OnPreRender(EventArgs e) +686
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.272
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please download and try the latest version:
Aspose.Cells
for GridWeb v2.7.6.2003
and see if it resolves your error.
If the error still occurs, then please provide me sample project replicating it, we will look into it and if it is a bug, we will report it to our development team for a fix.
I still have the same problem after using the new dll’s.
Also sending you the code which has the CreateNewBindRow() method.
FYI, the code files are taken from the demo project provided by ASPOSE.
Let me know if you need any further information.
Thanks,
Vijay
Hi,
I have download and run the Aspose.Cells for GridWeb demos i.e DataBind2.aspx demo.
Demos are running fine.
I have attached the screenshot for your reference. You will have to first open your solution.
If you are using Visual Studio 2008, then open Aspose.Cells.GridWeb.Demos.2008.sln file
If you are using Visual Studio 2010, then open Aspose.Cells.GridWeb.Demos.2010.sln file.
Then rebuild your solution.
I have mentioned these steps in a screenshot. Please look at it. Thanks.
Screenshot:
Hi,
I can observe the issue when I update the 2010 Demos with the latest version of Aspose GridWeb 2.7.6.2003. I have attached the screen shot of the error here as well, and logging this issue into our database for our development team to look into it.
The details are being logged against issue id: CELLSNET-40699
We will update you here on this thread once we get any update from our development team. Thank you for your feedback and reporting the issue.
Thanks for the update Kashif. Will be waiting for an update.
Vijay
Hi,
You need to rebuild the project.
Also, I have now updated the Aspose.Cells for GridWeb demos with the latest dll.
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry294646.aspx
Please download it and open your related solution file which are separate for VS2005, VS2008 and VS2010 and then rebuild the project as I have shown in the screenshot.
Everything will work fine.
Hi Shakeel,
I just downloaded the demo and followed your instructions to re-build the project and ran the application in visual studio 2010, .NET Framework 4.0.
I still get the same error when I try to open the Databind2.aspx page.
Was there any update on the issue logged by Kashif with issue id: CELLSNET-40699.
Please advise.
Error:
Server Error in '/' Application.
Unable to cast object of type 'Aspose.Cells.GridWeb.Validation' to type
'System.Collections.SortedList'.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.InvalidCastException: Unable to cast object of type
'Aspose.Cells.GridWeb.Validation' to type
'System.Collections.SortedList'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
[InvalidCastException: Unable to cast object of type 'Aspose.Cells.GridWeb.Validation' to type 'System.Collections.SortedList'.]
Aspose.Cells.GridWeb.Data.CellAttachObjectColletion.(Int32 , Int32 ) +130
Aspose.Cells.GridWeb.Data.Validations.(WebCell ) +46
Aspose.Cells.GridWeb.Data.WebCellImpl.get_Validation() +21
Aspose.Cells.GridWeb.GridWeb.() +16541
Aspose.Cells.GridWeb.GridWeb.OnPreRender(EventArgs e) +686
System.Web.UI.Control.PreRenderRecursiveInternal() +103
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Control.PreRenderRecursiveInternal() +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET
Version:4.0.30319.272
Thanks,
Vijay
Hi,
Thanks for your input.
We will look into your problem and update you asap.
Any update on this issue?
Thanks,
Vijay
Hi,
We are working on resolving this issue.
Once it is resolved, we will soon update you. Thanks for your patience.
GridWeb Validation Error
Hi,
We have fixed the issue. Please download and use the attached latest fix of Apose.Cells.GridWeb V 2.7.6.2005.
Hi Kashif,
Thanks for the update. I've updated the dll's in my project and now i don't see any error.
I have another issue with the grid. Please check the attached screenshot. The row numbers are not aligned with the actual rows. Can you let me know how fix this issue.
Thanks,
Hi,
Thanks for your input.
You are right. I was able to replicate this issue using the latest version:
Aspose.Cells
for GridWeb v2.7.6.2005
I have attached the screenshot for your reference.
We have logged this issue in our database for a fix.
This issue has been logged as CELLSNET-40724.
Please see the sample test code below. I have also attached the source xlsx file used in this code.
C#
if (Page.IsPostBack ==
false)
{
string filepath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;
//Import your save memory stream into GridWeb.
GridWeb1.WebWorksheets.ImportExcelFile(filepath);
}
Screenshot:
I also observed another issue, when typing in data into individual columns in a row, the row size seems to increase automatically. Please see the attached screenshot.
Let me know if you need additional information.
Thanks,
Vijay
pencor.it:
I also observed another issue, when typing in data into individual columns in a row, the row size seems to increase automatically. Please see the attached screenshot.
Let me know if you need additional information.
Thanks,
Vijay
Hi,
Thanks for the additional information.
We have logged your comments against the issue id: CELLSNET-40724.
Once, these issues are fixed, we will let you know.
pencor.it: Also is there a way to retain new data typed into an empty grid, during a postback.
I
have a button, when clicked would add new rows to the grid using
CreateNewBindRow() method, but I'm loosing the data entered into the
cells during postback.
Attached code samples
Thanks,
Vijay
Hi,
For your this issue, please follow this thread.
GridWeb Validation Error - Is there a way to retain new data typed into an empty grid
pencor.it: I also observed another issue, when typing in data into individual columns in a row, the row size seems to increase automatically. Please see the attached screenshot.
Let me know if you need additional information.
Thanks,
Vijay
Hi,
We have fixed this issue. Please download and try the latest fix:
Aspose.Cells for GridWeb v2.7.6.2006Let us know your feedback.
The issues you have found earlier (filed as CELLSNET-40724) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.