I am trying to create a User Control to place into a Telerik MegaMenu (RadMenu). The User Control is named "clientfilter" which will pull a sub-set of data from a SharePoint 2010 list. I have placed the following code into the "Page_Load" event but am getting errors on render.
The error I can see is "failure loading assembly 'Telerik.Web.UI.Design' ...", however, not sure if this is the real error or a by-product of a different error. When I originally entered the assembly registrations I mis-typed the name, however, I have subsequently fixed the name, but the error still persists. I have added the following to the GAC already:
In my custom master page I have the following registrations:
What am I missing? Why will the code not work?
Thank you in advance.
protected
void
Page_Load(
object
sender, EventArgs e)
{
SPSite site =
new
SPSite(
"http://abcdev"
);
using
(SPWeb web = site.OpenWeb())
{
try
{
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();
//myselect.Items.Add(clientddlvalue);
}
if
( !IsPostBack )
{
GridBoundColumn boundColumn;
//Important: first Add column to the collection
boundColumn =
new
GridBoundColumn();
this
.RadGrid1.MasterTableView.Columns.Add(boundColumn);
//Then set properties
boundColumn.DataField =
"clientid"
;
boundColumn.HeaderText =
"clientid"
;
}
}
}
catch
{
}
{
web.Dispose();
}
}
}
The error I can see is "failure loading assembly 'Telerik.Web.UI.Design' ...", however, not sure if this is the real error or a by-product of a different error. When I originally entered the assembly registrations I mis-typed the name, however, I have subsequently fixed the name, but the error still persists. I have added the following to the GAC already:
- Telerik.Web.UI
- Telerik.Web.Design
- Telerik.Web.UI.Skins
In my custom master page I have the following registrations:
<%@ Register Tagprefix=
"telerik"
Namespace=
"Telerik.Web.UI"
Assembly=
"Telerik.Web.UI, Version=2012.3.1205.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
%>
<%@ Register Tagprefix=
"telerik"
Namespace=
"Telerik.Web.Design"
Assembly=
"Telerik.Web.Design, Version=2012.3.1205.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
%>
What am I missing? Why will the code not work?
Thank you in advance.