We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

LinQ binding

Hi all,

I'm trying to bind Aspose.Grid to a LinQ object, but it doesnt work.

This is the error I get when trying to use a LinQ custom data object from Visual Studio 2008 control pannel:

Type 'System.Web.UI.WebControls.LinqDataSource' in Assembly 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.

or this when trying to bind manually ...

Type 'System.Data.Linq.DataQuery`1[[Contracts.Linq.nContractorCompany, ContractLinq, Version=, Culture=neutral, PublicKeyToken=null]]' in Assembly 'System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.

... using this code:

Dim dc As New nContractorCompaniesDataContext
Dim rs = From cc In dc.nContractorCompanies
grdEmployees.WebWorksheets(0).DataSource = rs

Issue has been resolved.

I was running an older version of Aspose.Grid.

The new hotfix seems to get rid of this issue.

All of my LinQ objects are serialized and bind perfectly with the Aspose.Grid on my web page.


GR8 product.

That’s great! Thank you for considering Aspose.

Another update ...

LinQ binding will not work in View State mode. Only Session State mode works.

That was the real issue behind the serialization errors.