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

4 posts, 0 answers
  1. Jiri Merz
    Jiri Merz avatar
    4 posts
    Member since:
    Sep 2008

    Posted 23 Mar 2009 Link to this post

    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.
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 25 Mar 2009 Link to this post

    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.

  3. Jiri Merz
    Jiri Merz avatar
    4 posts
    Member since:
    Sep 2008

    Posted 31 Mar 2009 Link to this post

    "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();

  4. Rosen
    Admin
    Rosen avatar
    3237 posts

    Posted 01 Apr 2009 Link to this post

    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.
Back to Top