This is a migrated thread and some comments may be shown as answers.

RADGrid in WSS System.Runtime.CompilerServices.StrongBox`1..ctor(System.__Canon)

3 Answers 85 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Jiri Merz
Top achievements
Rank 1
Jiri Merz asked on 23 Mar 2009, 03:49 PM
I have a RADGrid in a custom application page with code-behind. The grid displays the first page, however, there is an exception after the DataBind event, System.Runtime.CompilerServices.StrongBox`1..ctor(System.__Canon). This exception is also genetrated when trying to page through the grid or sort the columns.

The problem seems to be with loading the grid. When limiting the number of items so it has only one page this exception isn't thrown.

I've also tested everything in an ASP.NET site and it works as expected.

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 25 Mar 2009, 01:23 PM
Hello Jiri,

Can you please check whether the same issue appears when you move the grid outside of the MOSS context? Thus we can determine whether the issue is Sharepoint- or grid-related.

I will also appreciate if you share your code with us (using the 'Format Code Block' dialog at the top right corner of the forum editor) to investigate the matter further. Thus we will do our best to provide up-to-the-point explanation/solution.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Jiri Merz
Top achievements
Rank 1
answered on 31 Mar 2009, 03:40 PM
"I've also tested everything in an ASP.NET site and it works as expected"

I think this answered whether it is WSS related or not.


 

<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server" HorizontalAlign="NotSet">

 

 

<telerik:RadGrid ID="ProductGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"

 

 

AllowSorting="True" AutoGenerateColumns="False" GridLines="None"

 

 

ShowGroupPanel="True" Skin="Forest"

 

 

AutoGenerateEditColumn="True" PageSize="20">

 

 

<HeaderContextMenu>

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</HeaderContextMenu>

 

 

<MasterTableView datakeynames="ID" EditMode="InPlace" CellSpacing="-1">

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" Visible="false"

 

 

DataType="System.Int32" ReadOnly="True" SortExpression="ID">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn UniqueName="ProductCategory" HeaderText="Category" AllowFiltering="false"

 

 

SortExpression="Category" GroupByExpression="ProductCategory.Name Group By ProductCategory.Name">

 

 

<EditItemTemplate>

 

 

<telerik:RadComboBox ID="ProductCategoryCombo" Runat="server">

 

 

</telerik:RadComboBox>

 

 

</EditItemTemplate>

 

 

<ItemTemplate>

 

 

<asp:Label ID="ProductCategoryLabel" runat="server" Text="Name"></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="Code" HeaderText="Code" UniqueName="Code"

 

 

SortExpression="Code">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name"

 

 

SortExpression="Name">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Descr" HeaderText="Descr"

 

 

UniqueName="Descr" SortExpression="Descr">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridCheckBoxColumn DataField="IsTaxable" DataType="System.Boolean" HeaderText="IsTaxable"

 

 

UniqueName="IsTaxable" SortExpression="IsTaxable" AllowFiltering="false">

 

 

</telerik:GridCheckBoxColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings AllowDragToGroup="True">

 

 

</ClientSettings>

 

 

<FilterMenu>

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

 

</telerik:RadAjaxPanel>

 

var

 

data = Entities.Product.Include("ProductCategory").Execute(System.Data.Objects.MergeOption.NoTracking);

 

ProductGrid.DataSource = data;

DataBind();

0
Rosen
Telerik team
answered on 01 Apr 2009, 07:15 AM
Hi,

It seems that this error may be related to Entity Framework running under WSS in medium trust. Please refer this msdn forums thread for more information.

Best wishes,
Rosen
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Sharepoint Integration
Asked by
Jiri Merz
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Jiri Merz
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or