
Hello!
I've noticed that RadEditor have very usefull method ExportToPdf. When I invoke it, PDF file opens automatically in current browser window. But this is not what I want. I just want to save this PDF file to database and do not output it.
Is there any solution to do this?

Hi,
I have a 3 level hierarchical grid in page Grid.aspx. After expanding my grid to third level, I click on Add New Record, which opens a UserControl ( UsrCntrl1.ascx) as add template. This usercontrol contains a grid, a combo and a button (name is 'Add to grid') inside it.
In the usercontrol, when i select a value in the combobox and click on button 'Add to Grid', a server side function is called which updates rad grid datatable by adding a new row to it and then binding the grid again. After the addition process is complete, the grid is successfully updated with new row, but when this usercontrol(UsrCntrl1.ascx) finishes its postback and rebinds itself to the 3 level hierarchical grid an error occurs saying,
"Microsoft JScript runtime error: Sys.InvalidOperationException: A control is already associated with the element."
The Grid UI Code in UsrCntrl.ascx:
<rad:RadGrid ID="DynamicList" runat="server" ></rad:RadGrid>
The Grid Codebehind Code in UsrCntrl.ascx.cs:
protected
void AddToList(object sender, ImageClickEventArgs e)
{
DataTable
dt = new DataTable();
if (Session["List"] == null)
{
dtPayee.Columns.Add(
"ABC", typeof(string));
dtPayee.Columns.Add("XYZ", typeof(string));
}
else
dt = (
DataTable)Session["List"];
DataRow dr = dt.NewRow();
dr[
"ABC"]= "Hello";
dr["XYZ"]= "Bye";
dt.Rows.Add(dr);
DynamicList.DataSource = dt;
DynamicList.DataBind();
Session[
"List"] = dt;
}
What is causing this error ? I have already checked that there is no naming / ID conflicts between the grid page and template(usercontrol) page.
| <style type="text/css"> |
| .RadScheduler .rsContent .rsHoursTable th |
| { |
| font-size:10px; |
| line-height: 15px; |
| height:15px; |
| } |
| .rsContent .rsContentTable .rsCell |
| { |
| font-size:10px; |
| line-height: 15px; |
| height:15px; |
| } |
| </style> |
| ASPX file | |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> | |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> | |
| <!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:ScriptManager> | |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="EndTime" | |
| DataKeyField="Subject" DataSourceID="ObjectDataSource1" | |
| DataStartField="StartTime" DataSubjectField="Subject" | |
| HoursPanelTimeFormat="htt" ValidationGroup="RadScheduler1" | |
| GroupBy="MeetingRoom" GroupingDirection="Vertical" ShowHeader="false" | |
| ShowViewTabs="False" SelectedView="ResourceView,TimelineView"> | |
| <ResourceTypes> | |
| <telerik:ResourceType DataSourceID="ObjectDataSource1" KeyField="Room.ID" | |
| Name="Room.Name" TextField="Room.Name" ForeignKeyField="Room.ID" /> | |
| </ResourceTypes> | |
| </telerik:RadScheduler> | |
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" | |
| SelectMethod="GetBookings" TypeName="Booking"></asp:ObjectDataSource> | |
| </form> | |
| </body> | |
| </html> | |
| using System; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Summary description for BookingClass | |
| /// </summary> | |
| public class Booking | |
| { | |
| public Booking() | |
| { | |
| } | |
| public Booking(DateTime s, DateTime e, String Subject,MeetingRoom pRoom) | |
| { | |
| StartTime = s; | |
| EndTime = e; | |
| this.Subject = Subject; | |
| Room = pRoom; | |
| } | |
| private DateTime _StartTime; | |
| public DateTime StartTime | |
| { | |
| get { return _StartTime; } | |
| set { _StartTime = value; } | |
| } | |
| private DateTime _EndTime; | |
| public DateTime EndTime | |
| { | |
| get { return _EndTime; } | |
| set { _EndTime = value; } | |
| } | |
| private MeetingRoom _Room; | |
| public MeetingRoom Room | |
| { | |
| get { return _Room; } | |
| set { _Room = value; } | |
| } | |
| private string _Subject; | |
| public string Subject | |
| { | |
| get { return _Subject; } | |
| set { _Subject = value; } | |
| } | |
| public List<Booking> GetBookings() | |
| { | |
| List<Booking> lst = new List<Booking>(); | |
| for (int i = 1; i <= 10; i++) | |
| { | |
| MeetingRoom room = new MeetingRoom(i, "Nalanda " + i.ToString()); | |
| lst.Add(new Booking(DateTime.Now.AddMinutes(10 * i), DateTime.Now.AddMinutes((10 * i) + 20), "Booking " + i.ToString(),room)); | |
| } | |
| return lst; | |
| } | |
| } | |
| public class MeetingRoom | |
| { | |
| public MeetingRoom(int pID, string pName) | |
| { | |
| this.ID = pID; | |
| this.Name = pName; | |
| } | |
| private int _ID; | |
| private string _Name; | |
| public string Name | |
| { | |
| get { return _Name; } | |
| set { _Name = value; } | |
| } | |
| public int ID | |
| { | |
| get { return _ID; } | |
| set { _ID = value; } | |
| } | |
| } |
| using System; | |
| public partial class _Default : System.Web.UI.Page | |
| { | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| } | |
| } |
<appSettings>
<add key="Telerik.EnableEmbeddedSkins" value="false" />
<add key="Telerik.EnableBaseStyleSheet" value="false" />
</appSettings>
We then used a method posted by one of your techs where we use a usercontrol that looks for all ISkinnableControls within the current form and sets their skin property to our custom skin. This all works fine.. The problem is that we see three stylesheet references to webresources.axd in our html document, which shouldn't be there since we are not using embedded skins? Why three, why any :)
<link href="/WebResource.axd?d=_NkAcKzL_lR4vdCVSsRvaCWD41UmOOu-yM0BgPeB33QQvLJdXYTZGVCUIKILah0L0&t=633631346260000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />
<link href="/WebResource.axd?d=_NkAcKzL_lR4vdCVSsRvaCWD41UmOOu-yM0BgPeB33Tq9aa_akvAEN4I8wtVTgK0ISNuu78FGbxSfzrd9eBydw2&t=633631346260000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />
<link href="/WebResource.axd?d=_NkAcKzL_lR4vdCVSsRvaCWD41UmOOu-yM0BgPeB33QQ3R6S2A9PwmfdOAgsjdba0&t=633631346260000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" />