I am getting an "access denied" error when using the RadEditor for Ajax when using the Link Manager and the Table Wizard. Initially I got this with the Image manager but have since resolved the issue by setting the folder paths. However, I remain stumped with the other problems.
My XML definition for the editor is (no code script written):
<rad:radeditor runat="server" ID="RadEditor2" Width="550px" Height="390px" Skin="Web20" ToolsFile="~/App_Data/EditorTools.xml" BackColor="White">
<ImageManager ViewPaths="~/Users/TBA/Images" DeletePaths="~/Users/TBA/Images" UploadPaths="~/Users/TBA/Images" />
<DocumentManager ViewPaths="~/Users/TBA/" />
<content>
<
h1>This is the editor</h1></content>
</rad:radeditor>
My web.config looks like:
<
system.webServer>
<
handlers>
...
<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>
</
handlers>
</system.webServer>
<
system.web>
<
httpHandlers>
...
<add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
<
add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
</httpHandlers>
</system.web>
Thanks...
Andrew
Hi guys,
I'm having a problem with RadPanelBar. It is refreshing the whole page when I'm using it in SharePoint.
I did a sample test application without using SharePoint and it is working properly (not refreshing the whole page).
Below is the sample I create: (Note that this sample is the asp.net, not the SharePoint code as it will be the same).
Kindly highlight or specify what I did wrong or what I need to do in able to make it work on SharePoint.
Please be kind as I am not a frequent forum poster. Thanks in advance for the help/support.
### Navigation Control: START ###
=== ASCX: START ===
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="navigation.ascx.cs" Inherits="AJAXEnabledWebApplication1.navigation" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
Namespace="Telerik.Web.UI" TagPrefix="rad" %>
<rad:RadPanelBar runat="server" ID="radPanelBar1" Skin="Office2007" ExpandMode="SingleExpandedItem" Width="100%">
</rad:RadPanelBar>
=== ASCX: END ===
=== ASCX.CS: START ===
namespace AJAXEnabledWebApplication1
{
public partial class navigation : System.Web.UI.UserControl
{
public EventHandler OnItemClick;
protected void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
{
radPanelBar1.DataSource = this.GetData();
radPanelBar1.DataTextField = "Desc";
radPanelBar1.DataValueField = "Id";
radPanelBar1.DataBind();
}
}
protected override void OnInit(System.EventArgs e)
{
radPanelBar1.ItemClick += radPanelBar1_ItemClick;
}
private void radPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
{
if (OnItemClick != null)
{
OnItemClick(this, new navigation.NavigationEventArgs(e.Item.Value));
}
}
private DataTable GetData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Id");
dt.Columns.Add("Desc");
for (int i = 0; i < 5; i++)
{
DataRow newRow = dt.NewRow();
newRow["Id"] = i.ToString();
newRow["Desc"] = i.ToString() + " Description";
dt.Rows.Add(newRow);
}
return dt;
}
#region <<<EventHandler>>>
public delegate void EventHandler(object sender, NavigationEventArgs e);
public class NavigationEventArgs : System.EventArgs
{
private string _id = string.Empty;
public NavigationEventArgs()
{
_id = string.Empty;
}
public NavigationEventArgs(string id)
{
_id = id;
}
public string Id
{
get { return _id; }
set { _id = value; }
}
}
#endregion
}
}
=== ASCX.CS: END ===
### Navigation Control: END ###
### ACTUAL PAGE: START ###
=== ASPX: START ===
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication1._Default" %>
<%@ Register Src="navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>
<%--<%@ Register Src="~/layouts/_controltemplates/navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<table style="width: 100%; height=100%">
<tr>
<td>
<navigationUC:Navigation runat="server" ID="navigationUC1"></navigationUC:Navigation>
</td>
</tr>
<tr>
<td height="100%">
<asp:ListBox runat="server" ID="listBox" Height="400px"></asp:ListBox>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
=== ASPX: END===
=== ASPX.CS: START===
namespace AJAXEnabledWebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected override void OnInit(EventArgs e)
{
navigationUC1.OnItemClick += navigationUC1_OnItemClick;
}
private void navigationUC1_OnItemClick(object sender, navigation.NavigationEventArgs e)
{
listBox.Items.Add(e.Id);
}
}
}
=== ASPX.CS: END ===
### ACTUAL PAGE: END ###
| Line: 14816 Error: Object doesn't support this property or method |
Then, if I choose to debug, the error occurs at the last line of this code block (14816):
| },_removeDropDown:function(){ |
| var _3c=this.get_dropDownElement().parentNode; |
| _3c.parentNode.removeChild(_3c); |
| if(this._disposeChildElements&&typeof |
| (Sys.WebForms)!="undefined"){ |
| Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c); |
Following some leads, I have been able to work around the error on some pages by declaring the ScriptManager "closer" to the page that uses it - basically, "hiding" or removing the ScriptManager on the MasterPage and replacing it with one on the content page. BTW, if you try to do this, you'll find that while you can easily add a ScriptManager programmatically, it's quite difficult to remove one, since it's resistant to Controls.Remove(), ControlsRemoveAt(), .Visible, etc. The solution which has worked for me is to place the ScriptManager in a ContentPlaceHolder on the Master Page, "blank" it out on the content page using an empty ContentPlaceHolder, then programmatically add a new ScriptManager in Page_Init. (Yes, a hack, I know.)
However, placing the ScriptManager on the content page only works for some of the pages! In addition, in more complex content pages with nested user controls (e.g. a UC with a RadGrid, which then also hosts a UC for the edit form), I can't determine where/when exactly to add the ScriptManager to satisfy all the controls; some of them can't find it and exception out.
I have tested this on a stripped down project which just 1 Master Page + 1 content page. If I place the ScriptManager on the Master Page, I get the error. If I wipe out the ScriptManager on the Master Page and then re-add it in Page_Init of the content page, it works fine without errors, and I get AJAX partial page postback functionality.
Lastly, I have tried using the Q3 2009 version (trial) and I get the same error.
Any advice appreciated! Thanks,
Allen
ResultsGrid.ExportSettings.IgnorePaging =
False
If ResultsGrid.SelectedItems.Count <> 0 Then
For Each item As GridDataItem In ResultsGrid.MasterTableView.Items
If Not item.Selected Then item.Visible = False
Next
End If
ResultsGrid.ExportSettings.OpenInNewWindow =
True
ResultsGrid.ExportSettings.IgnorePaging =
False
ResultsGrid.ExportSettings.ExportOnlyData =
True
ResultsGrid.MasterTableView.ExportToPdf()
protected
void tatSummaryGrd_NeedDataSource(object source, GridNeedDataSourceEventArgs e) {
tatSummaryGrd.DataSource = InsuranceProcessLib.GetExcelImportHistory(_FromDate, _ToDate);
}
protected void tatSummaryGrd_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e) {
if (_DataViews.Contains(e.DetailTableView)) return;
_DataViews.Add(e.DetailTableView);
int importID = BPM.IsNullInt(e.DetailTableView.ParentItem.GetDataKeyValue("ImportID"), 0);
e.DetailTableView.DataSource = InsuranceProcessLib.GetExcelImportPolicyList(importID);
e.DetailTableView.DataBind();
}
protected void tatSummaryGrd_ItemCommand(object source, GridCommandEventArgs e) {
if (e.CommandName == "Excel") {
Int32 index = Convert.ToInt32(e.CommandArgument);
GridDataItem item = tatSummaryGrd.Items[index];
item.OwnerTableView.ExportToExcel();
}
}
}