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

SharePoint 2010 & RadGrid assembly error Telerik.Web.UI not found

3 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 18 Dec 2012, 04:30 PM
I am creating a User Control for SharePoint 2010 using the Telerik RadGrid. I am getting an error "Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified."

Here is my web.config entries for the Telerik controls on the server.

<SafeControl Assembly="Telerik.Web.UI, Version=2012.3.1205.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />
      <SafeControl Assembly="Telerik.Web.UI.Skins, Version=2012.3.1205.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI.Skins" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />
      <SafeControl Assembly="Telerik.Web.Design, Version=2012.3.1205.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.Design" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="True" />

Here is my code in the User Control:
protected void Page_Load(object sender, EventArgs e)
        {
            SPSite site = new SPSite("http://abcdev");
            using (SPWeb web = site.OpenWeb())
            {
                SPList clientlist = web.Lists.TryGetList("clientmatter");
            }
        }
 
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            SPSite site = new SPSite("http://abcdev");
            using (SPWeb web = site.OpenWeb())
            {
                SPList clientlist = web.Lists.TryGetList("clientmatter");
 
                //if (clientlist != null)
                //{
                //    SPListItemCollection clientitems = clientlist.Items;
                //    DataGrid dg = new DataGrid();
                //    dg.DataSource = clientlist.Items.GetDataTable();
 
        //            foreach (SPListItem clientitem in clientitems)
        //            {
        //                string clientddlvalue = clientitem["clientid"].ToString();
        //            }
                //}
            }
        }

This is quite frustrating! :(
What steps must be performed for these errors not to be thrown?

3 Answers, 1 is accepted

Sort by
0
Venkatesh
Top achievements
Rank 1
answered on 19 Dec 2012, 02:16 PM
Hi,
Please check if the telerik web.ui dll is in GAC. If not add the dll to GAC

Hope it helps
0
Alex
Top achievements
Rank 1
answered on 19 Dec 2012, 03:49 PM
Yes, the Telerik.Web.UI assembly is:
  • placed in the GAC
  • added to web.config
  • placed in the 14 hive "bin" directory
  • placed in the 14 hive "controltemplates" sub-directory for my solution

I am also only using a single version 2012.3.1205.35

0
Venkatesh
Top achievements
Rank 1
answered on 20 Dec 2012, 06:25 AM
Hi,
In Visual studio, you would have add the Telerik.web.ui dll in "Add reference". Select the dll and check the path of it. Can you check if the dll is pointing to the GAC.

Also, add the telerik.web.design dll in GAC.

Please refer http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html


Thanks
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Venkatesh
Top achievements
Rank 1
Alex
Top achievements
Rank 1
Share this question
or