Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
84 views
Hi I am trying to adjust some code for the image manager so it points to a CDN.
Currently I have it pointing to a local folder:

imageManagerParameters.ViewPaths = New String() {"~/media/thumbnails"}
imageManagerParameters.UploadPaths = New String() {"~/media/thumbnails"}
imageManagerParameters.DeletePaths = New String() {"~/media/thumbnails"}



However if I enter a full URL I get an error
For example: imageManagerParameters.ViewPaths = New String() {"http://646464.rackcdn.com/thumbnails"}

Does anyone know a work around for this?
Thanks in advance.
Ianko
Telerik team
 answered on 09 Jan 2014
3 answers
160 views
Hi,

I believe I have found a bug in the RadEditor and I can reproduce it in the Editor demo on your demo site. I have reproduced it in Firefox and Chrome, although they give different javascript errors. Here what you can do to reproduce the error:

1. Go to the Overview of the Rad Editor demo
2. Switch the editor to HTML mode
3. Add <html> as the first line before "<h2 class="titletext">......"
4. Switch to Design mode
5. Uncheck any of the checkboxes under "Change Edit Mode"

When the AJAX callback is done, a javascript error will appear and your change will not be displayed (if you unselected "HTML Mode", the HTML tab will still be on the editor).

In Firefox, the error is:   TypeError: c._events is undefined
In Chrome, the error is:  TypeError: Cannot read property 'keypress' of undefined.

this appears to only be an issue while the ContentAreaMode is set to IFrame. I could not reproduce it with the mode set to Div. However, we have a situation where the mode must be set to IFrame to achieve the features weneed, so simply switching the modes will not work for us.

We are currently using version 2013.1114.40 and experience this issue. We recently upgraded from 2012.1.0320.40 where we did not experience this problem.

Any help would be greatly appreciated. 

Ianko
Telerik team
 answered on 09 Jan 2014
2 answers
179 views
Hello 

I am using RadEditor and i am facing an issue. when RadEditor is rendering first time it not showing any content.

Because height of Iframe is just 16px;

 
<iframe frameborder="0" src="javascript:'<html></html>';" id="ctl00_MasterPage_OrderMainInstructions_TxtOrderSpecialInstructions_contentIframe" title="Rich text editor with ID ctl00_MasterPage_OrderMainInstructions_TxtOrderSpecialInstructions" style="width: 100%; height: 16px; margin: 0px; padding: 0px;">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe> 


Could you please help me to solve this issue?

Thanks
Ck Nitin
Ianko
Telerik team
 answered on 09 Jan 2014
1 answer
96 views
Hi 

I am binding the object datasorce at runtime to radschedular and also I have validate overriding of appointment


help me in which page event I should bind data so data is available for data binding
My problem is if I add data in oninit the schedular not get refreshed after insert data and if I bind data in onprerender the validation not working 
<telerik:RadScheduler runat="server" ID="EventScheduler" Skin="Office2010Silver"
            EnableEmbeddedSkins="false" ShowViewTabs="False" SelectedView="TimelineView"
            StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="true" CustomAttributeNames="BookedBy,HostEmpNo,HostName,BookedByName"
            AppointmentStyleMode="Default" OverflowBehavior="Expand" RowHeaderWidth="230"
            RowHeight="48" EnableExactTimeRendering="True" ShowFooter="False" OnClientAppointmentInserting="AppointmentInserting"
            OnClientAppointmentMoveEnd="AppointmentMoveEnd" OnClientAppointmentResizing="AppointmentResizing"
            OnClientTimeSlotClick="InsertAppointment" OnClientFormCreated="SchedulerFormCreated"
            OnAppointmentDataBound="EventScheduler_AppointementDataBound" OnResourceHeaderCreated="EventScheduler_ResourceHeaderCreated"
            OnNavigationCommand="EventScheduler_NavigationCommand" OnNavigationComplete="EventScheduler_NavigationComplete"
            OnPreRender="EventScheduler_PreRender" OnTimeSlotCreated="EventScheduler_TimeSlotCreated"
            OnAppointmentCreated="EventScheduler_AppointmentCreated" OnAppointmentInsert="EventScheduler_AppointmentInsert"
            OnAppointmentUpdate="EventScheduler_AppointmentUpdate" OnAppointmentDelete="EventScheduler_AppointmentDelete"
            OnRecurrenceExceptionCreated="EventScheduler_RecurrenceExceptionCreated">
            <AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />
            <TimeSlotContextMenuSettings EnableDefault="True" />
            <TimeSlotContextMenus>
                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
                    <Items>
                        <telerik:RadMenuItem Text="New Event" ImageUrl="Images/EventNew.gif" Value="CommandAddAppointment">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem Text="New Recurring Event" ImageUrl="Images/EventRecurring.gif"
                            Value="CommandAddRecurringAppointment">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadSchedulerContextMenu>
            </TimeSlotContextMenus>
            <TimelineView GroupBy="Room" GroupingDirection="Vertical" TimeLabelSpan="1" ColumnHeaderDateFormat="HH:mm" />
            <ResourceTypes>
                <telerik:ResourceType Name="Room" KeyField="ResourceID" TextField="ResourceName"
                    ForeignKeyField="ResourceID" />
            </ResourceTypes>
            <ResourceHeaderTemplate>
                <div style="text-align: left; padding: 5px 0 0 5px;">
                    <asp:Label ID="lblRoom" runat="server" ForeColor="DarkBlue" Text='<%# Eval("Text") %>' />
                    <br />
                    <br />
                    <div class="floatingmandiv">
                        <asp:HyperLink ID="hlImgRoom" runat="server" ClientIDMode="Static" NavigateUrl='<%# String.Concat(@"~/Pages/Handlers/ImgHandler.ashx?key=",Eval("Key")) %>'>
                            <asp:Image ID="imgRoom" runat="server" CssClass="zoomCursor" ImageUrl='<%# String.Concat(@"~/Pages/Handlers/ImgHandler.ashx?key=",Eval("Key")) %>' />
                        </asp:HyperLink>
                    </div>
                    <asp:Label ID="lblCapacity" runat="server" Visible="False" />
                    <asp:Repeater runat="server" ID="rptABC">
                        <ItemTemplate>
                            <div class="floating">
                                <asp:Image ID="imgProjector" runat="server" ToolTip='<%# Eval("RaRoomName") %>' Height="30"
                                    Width="30" ImageUrl='<%# string.Format("../Pages/Handlers/IconHandler.ashx?key={0}",Eval("RaId"))%>'
                                    onmouseover='showToolTip(this);' />
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <%--   <asp:Image ID="imgProjector" runat="server" Height="32" Width="32" Visible="False"
                        ImageUrl="../Pages/Handlers/IconHandler.ashx?key=1" onmouseover='showToolTip(this);' />
                    <asp:Image ID="imgBoard" runat="server" Height="32" Width="32" Visible="False" ImageUrl="../Pages/Handlers/IconHandler.ashx?key=3"
                        onmouseover='showToolTip(this);' />
                    <asp:Image ID="imgCapacity" runat="server" Height="32" Width="32" Visible="False"
                        ImageUrl="../Pages/Handlers/IconHandler.ashx?key=2" onmouseover='showToolTip(this);' />
                    <asp:Label ID="lblCapacity" runat="server" Visible="False" />--%>
                </div>
            </ResourceHeaderTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedFormInsert1" Mode="Insert" Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                    Booker='<%# Bind("BookedBy") %>' HostEmp='<%# Bind("HostEmpNo") %>' />
            </AdvancedInsertTemplate>
            <AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedFormEdit1" Mode="Edit" Subject='<%# Bind("Subject") %>'
                    Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                    Booker='<%# Bind("BookedBy") %>' HostEmp='<%# Bind("HostEmpNo") %>' />
            </AdvancedEditTemplate>
        </telerik:RadScheduler>
  


#region Page Events
 
       protected override void OnPreRender(EventArgs e)
       {
           base.OnPreRender(e);
           BindEventSchedular();
       }
 
       protected override void OnInit(EventArgs e)
       {
           base.OnInit(e);
           BindEventSchedular();
       }
 
 
       protected override void OnPreLoad(EventArgs e)
       {
           //Utility.SetSqlDSQueries(LocationDS, RoomDS, EventsDS);
 
           if (!IsPostBack)
           {
               Session["Locationstring"] = null;
               BindLocation();
           }
           //BindEventSchedular();
 
           if (IsPostBack) return;
           Utility.RefreshContext();
           Utility.SetTooltips();
       }
 
       private void BindEventSchedular()
       {
 
           //ResourceEventCollection oResourceEventColl = ResourceEvent.LoadList();
 
           //if (oResourceEventColl == null)
           //    oResourceEventColl = new ResourceEventCollection();
 
           string sLocations = "";
           if (Session["Locationstring"] != null)
           {
               sLocations = Session["Locationstring"].ToString();
           }
           else
           {
               sLocations = "";
           }
 
           ESSLib.Data.DataObjects.ResourceCollection oResourceColl = ESSLib.Data.DataObjects.Resource.ResourcesByLocation(sLocations);
 
           if (oResourceColl != null)
           {
               List<ResourceEvent> oResourceEventColl = ResourceEvent.LoadList().ToList();
               if (oResourceEventColl == null)
                   oResourceEventColl = new System.Collections.Generic.List<ResourceEvent>();
               else
               {
                   oResourceEventColl = (from oresourceevent in oResourceEventColl
                                         join oresource in oResourceColl on oresourceevent.ResourceID equals oresource.ResourceID
                                         select oresourceevent).ToList();
               }
 
               EventScheduler.DataSource = oResourceEventColl;
               EventScheduler.DataKeyField = "ResourceEventHeadID";
               EventScheduler.DataSubjectField = "ResourceEvent";
               EventScheduler.DataStartField = "EventStartDate";
               EventScheduler.DataEndField = "EventEndDate";
               EventScheduler.DataRecurrenceField = "RecurrenceRule";
               EventScheduler.DataRecurrenceParentKeyField = "RecurrenceParentID";
 
               EventScheduler.ResourceTypes[0].DataSource = oResourceColl;
               EventScheduler.DataBind();
           }
       }
 
       private void BindLocation()
       {
           LocationCollection oLocationColl = Location.LoadList();
           ESSLib.Data.DataObjects.ResourceCollection oResourceColl = ESSLib.Data.DataObjects.Resource.LoadList();
           if (oLocationColl != null && oResourceColl != null)
           {
               List<Location> oLocation = (from olocation in oLocationColl
                                           join oresourcecoll in oResourceColl on olocation.LocationCode equals oresourcecoll.LocationCode
                                           select olocation).ToList();
 
               chkLocationList.DataSource = oLocation;
               chkLocationList.DataTextField = "LocationDesc";
               chkLocationList.DataValueField = "LocationCode";
               chkLocationList.DataBind();
           }
       }
 
       protected void Page_Load(object sender, EventArgs e)
       {
           #region Set logged in user from web.config
 
           // Validate user
           string userRole;
           Employee oEmployee = new Employee(Session["EmpNo"].ToString());
           if (oEmployee.IsExists)
           {
               userRole = oEmployee.ProfileCode == 1 ? "Admin" : "User";
               Session["User"] = new List<string> { userRole, oEmployee.EmpNo };
           }
           else
               Session["User"] = Utility.LoggedUserRole = Utility.LoggedUserEmp = null;
 
           // Save logged in user information
           if (Session["User"] == null) return;
 
           var data = Session["User"] as List<string>;
           if (data == null) return;
 
           Utility.LoggedUserRole = data[0];
           Utility.LoggedUserEmp = data[1];
 
           #endregion
 
           if (IsPostBack) return;
           Utility.SetTimeLineAttributes(EventScheduler, hfSchedulerDate);
       }
 
       protected void Page_LoadComplete(object sender, EventArgs e)
       {
           if (Utility.Resources != null)
               Utility.Resources.Clear();
       }
 
       #endregion
 
       #region Scheduler Events
 
       protected void EventScheduler_AppointementDataBound(object sender, SchedulerEventArgs e)
       {
           //BindEventSchedular();
           Utility.SetAppointmentAttributes(e);
       }
 
       protected void EventScheduler_ResourceHeaderCreated(object sender, ResourceHeaderCreatedEventArgs e)
       {
           Utility.SetHeaderAttributes(e);
       }
 
       protected void EventScheduler_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
       {
           var aptStartTime = e.TimeSlot.Start.TimeOfDay;
           var aptEndTime = e.TimeSlot.End.TimeOfDay;
 
           //Get Open and Close Time
           if (Utility.Resources != null && !Utility.Resources.Contains(e.TimeSlot.Resource.Text))
           {
               Utility.Resources.Add(e.TimeSlot.Resource.Text);
               Utility.GetHours(e.TimeSlot.Resource.Text, out _resStartTime, out _resEndTime);
           }
           else if (Utility.Resources == null)
           {
               Utility.Resources = new List<string> { e.TimeSlot.Resource.Text };
               Utility.GetHours(e.TimeSlot.Resource.Text, out _resStartTime, out _resEndTime);
           }
 
           if (Utility.IsBlockedTimeSlot(aptStartTime, aptEndTime, _resStartTime, _resEndTime))
           {
               e.TimeSlot.CssClass = "Disabled";
           }
       }
 
       protected void EventScheduler_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
       {
           switch (e.Command)
           {
               case SchedulerNavigationCommand.NavigateToPreviousPeriod:
                   //EventScheduler.SelectedDate = Utility.GetDate(Utility.Commands.Prev, EventScheduler.SelectedDate);
                   break;
 
               case SchedulerNavigationCommand.NavigateToNextPeriod:
                   EventScheduler.SelectedDate = Utility.GetDate(Utility.Commands.Next, EventScheduler.SelectedDate);
                   break;
           }
       }
 
       protected void EventScheduler_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
       {
           if (EventScheduler.SelectedView != SchedulerViewType.TimelineView) return;
           Utility.SetTimeLineAttributes(EventScheduler, hfSchedulerDate);
       }
 
       protected void EventScheduler_PreRender(object sender, EventArgs e)
       {
           // Set Scheduler width as per timeslots
           var slotsWidth = Convert.ToInt32(Utility.NumberOfSlots * 51);
           const int rowHeaderWidth = 230;
           EventScheduler.Width = Unit.Pixel(slotsWidth + rowHeaderWidth);
 
           // Hide location panel if no resources
           var resources = from c in Utility.EssResources select c;
           pnlLocations.Visible = resources.Any();
       }
 
       #endregion
 
       #region Appointement Insert, Update & Delete
 
       protected void EventScheduler_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
       {
           if (Session["User"] != null)
           {
               var aptStartTime = e.Appointment.Start.TimeOfDay;
               var aptEndTime = e.Appointment.End.TimeOfDay;
               var resource = e.Appointment.Resources.GetResourceByType("Room");
               bool isOk = true;
               // Check if blocked timeslot
               Utility.GetHours(resource.Text, out _resStartTime, out _resEndTime);
               if (Utility.IsBlockedTimeSlot(aptStartTime, aptEndTime, _resStartTime, _resEndTime))
               {
                   e.Cancel = true;
                   isOk = false;
                   ShowErrorMessage("Creating events in blocked timeslot is not allowed.");
               }
 
               // Check if there is alreay an appointment
               if (Utility.ExceedsLimit(e.Appointment, EventScheduler))
               {
                   e.Cancel = true;
                   isOk = false;
                   ShowErrorMessage("Creating events in occupied timeslot is not allowed.");
               }
 
               //string s = ((RadComboBox)EventScheduler.FindControl("ResHostEmp")).SelectedValue;\\
               if (isOk)
               {
                   int iRecurrenceParentID;
                   if (e.Appointment.RecurrenceState == RecurrenceState.NotRecurring)
                       iRecurrenceParentID = -1;
                   else
                       iRecurrenceParentID = Convert.ToInt32(e.Appointment.RecurrenceParentID);
 
                   Utility.InsertAppointment(e.Appointment.Subject, e.Appointment.Start, e.Appointment.End, Convert.ToInt32(resource.Key), Session["HostNo"].ToString(), Session["EmpNo"].ToString(), e.Appointment.RecurrenceRule.ToString(), iRecurrenceParentID);
 
                   Session["HostNo"] = null;
                   EventScheduler.Rebind();
               }
               else
               {
                   e.Cancel = true;
               }
           }
           else
           {
               e.Cancel = true;
               ShowErrorMessage("Only logged in user can create events.");
           }
       }
 
       protected void EventScheduler_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
       {
           if (Session["User"] != null)
           {
               var aptStartTime = e.Appointment.Start.TimeOfDay;
               var aptEndTime = e.Appointment.End.TimeOfDay;
               var resource = e.Appointment.Resources.GetResourceByType("Room");
               bool isOk = true;
               // Do not allow for blocked timeslot to anyone
               Utility.GetHours(resource.Text, out _resStartTime, out _resEndTime);
               if (Utility.IsBlockedTimeSlot(aptStartTime, aptEndTime, _resStartTime, _resEndTime))
               {
                   e.Cancel = true;
                   isOk = false;
                   ShowErrorMessage("Updating events in blocked timeslot is not allowed.");
               }
 
               // If it is not user's created event
               if (Utility.LoggedUserRole == "User" && !e.Appointment.Attributes["BookedBy"].Equals(Utility.LoggedUserEmp))
               {
                   e.Cancel = true;
                   isOk = false;
                   ShowErrorMessage("You cannot modify other user's created events.");
               }
 
               // If appointment overlaps
               if (Utility.AppointmentsOverlap(e.ModifiedAppointment, EventScheduler))
               {
                   e.Cancel = true;
                   isOk = false;
                   ShowErrorMessage("Updating events in occupied timeslot is not allowed.");
               }
 
               if (isOk)
               {
                   int iRecurrenceParentID;
                   if (e.ModifiedAppointment.RecurrenceState == RecurrenceState.NotRecurring)
                       iRecurrenceParentID = -1;
                   else
                       iRecurrenceParentID = Convert.ToInt32(e.ModifiedAppointment.RecurrenceParentID);
 
                   if (Session["HostNo"] == null)
                   {
                       Session["HostNo"] = e.Appointment.Attributes["HostEmpNo"];
                   }
 
                   Utility.UpdateAppointment(Convert.ToInt32(e.Appointment.ID), e.ModifiedAppointment.Subject, e.ModifiedAppointment.Start, e.ModifiedAppointment.End, Convert.ToInt32(resource.Key), Session["HostNo"].ToString(), Session["EmpNo"].ToString(), e.ModifiedAppointment.RecurrenceRule.ToString(), iRecurrenceParentID);
                   EventScheduler.Rebind();
                   Session["HostNo"] = null;
               }
           }
           else
           {
               e.Cancel = true;
               ShowErrorMessage("Only logged in user can modify events.");
           }
       }
 
       protected void EventScheduler_AppointmentDelete(object sender, AppointmentDeleteEventArgs e)
       {
           if (Session["User"] != null)
           {
               if (Utility.LoggedUserRole == "User" && !e.Appointment.Attributes["BookedBy"].Equals(Utility.LoggedUserEmp))
               {
                   e.Cancel = true;
                   ShowErrorMessage("You cannot delete other user's created events.");
               }
 
               Utility.DeleteAppointment(Convert.ToInt32(e.Appointment.ID));
               EventScheduler.Rebind();
           }
           else
           {
               e.Cancel = true;
               ShowErrorMessage("Only logged in user can delete events.");
           }
 
       }
 
       protected void EventScheduler_RecurrenceExceptionCreated(object sender, RecurrenceExceptionCreatedEventArgs e)
       {
           if (!Utility.AppointmentsOverlap(e.ExceptionAppointment, EventScheduler)) return;
           e.Cancel = true;
           ShowErrorMessage("Exception occured. You are trying disabled actions.");
       }
 
       protected void EventScheduler_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
       {
           Control SchedulerAdvancedForm;
           switch (e.CommandName.ToLower())
           {
               case "insert":
                   SchedulerAdvancedForm = e.Container.FindControl("AdvancedFormInsert1"); break;
               case "update":
                   SchedulerAdvancedForm = e.Container.FindControl("AdvancedFormEdit1"); break;
               default:
                   SchedulerAdvancedForm = e.Container.FindControl("AdvancedFormInsert1"); break;
           }
 
           if (SchedulerAdvancedForm != null)
           {
               e.Container.Appointment.Attributes["HostEmpNo"] = ((RadComboBox)SchedulerAdvancedForm.FindControl("ResHostEmp")).SelectedValue;
           }
       }
 
       #endregion
 
       #region Show Tooltip in EventScheduler
 
       protected void EventScheduler_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
       {
           if (!e.Appointment.Visible || IsAppointmentRegisteredForTooltip(e.Appointment)) return;
 
           var id = e.Appointment.ID.ToString();
 
           foreach (var domElementID in e.Appointment.DomElements)
           {
               EventToolTipManager.TargetControls.Add(domElementID, id, true);
           }
       }
 
       private bool IsAppointmentRegisteredForTooltip(Appointment apt)
       {
           return EventToolTipManager.TargetControls.Cast<ToolTipTargetControl>().Any(targetControl => apt.DomElements.Contains(targetControl.TargetControlID));
       }
 
       protected void EventToolTipManager_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
       {
           var appointment = EventScheduler.Appointments.FirstOrDefault(apt => apt.ID.ToString().Equals(e.Value));
           if (appointment == null) return;
 
           var toolTip = (EventToolTip)LoadControl("~/Pages/UserControls/EventToolTip.ascx");
           toolTip.TargetAppointment = appointment;
           e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip);
       }
 
       #endregion
 
       #region Location and Filter
 
       protected void chkLocationList_DataBound(object sender, EventArgs e)
       {
           string sLocationstring = "";
           for (var i = 0; i < chkLocationList.Items.Count; i++)
           {
               if (sLocationstring == "")
                   sLocationstring = chkLocationList.Items[i].Value;
               else
                   sLocationstring = sLocationstring + "," + chkLocationList.Items[i].Value;
 
               Session["Locationstring"] = sLocationstring;
               chkLocationList.Items[i].Selected = true;
               chkLocationList.Items[i].Text = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(chkLocationList.Items[i].Text.ToLower());
           }
       }
 
       protected void chkLocationList_SelectedIndexChanged(object sender, EventArgs e)
       {
           //RoomDS.SelectCommand = Utility.FilterQuery(chkLocationList);
           //RoomDS.DataBind();
           CheckBoxList ocheckboxlist = ((CheckBoxList)sender);
           IEnumerable<string> CheckedItems = ocheckboxlist.Items.Cast<ListItem>()
                                  .Where(i => i.Selected)
                                  .Select(o => o.Value);
           string sLocationstring = "";
 
           if (CheckedItems.Count() > 0)
           {
               foreach (string s in CheckedItems)
               {
                   if (sLocationstring == "")
                       sLocationstring = s;
                   else
                       sLocationstring = sLocationstring + "," + s;
               }
           }
           Session["Locationstring"] = sLocationstring;
           //EventScheduler.Rebind();
       }
 
       #endregion
 
       /// <summary>
       /// Show message to users for insert or update events in Scheduler from Advanced Form.
       /// </summary>
       /// <param name="message">Message to show to user.</param>
       private void ShowErrorMessage(string message)
       {
           Label1.Text = message;
           System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, GetType(), "LabelUpdated", "$telerik.$('.lblError').show().animate({ opacity: 0.9 }, 3000).fadeOut('slow');", true);
       }
Plamen
Telerik team
 answered on 09 Jan 2014
1 answer
59 views
Hi,

I Need to export the radgrid content to pdf on button click and need to send that pdf as an attachment in mail.

 The button is placed outside the grid. i used the following code but it prompts "Do you want to open or save?".
RadGrid1.GridExporting += new OnGridExportingEventHandler(RadGrid1_GridExporting);
            RadGrid1.ExportSettings.FileName = FileName;
           
            RadGrid1.MasterTableView.ExportToPdf();

 

For my requirement i need to export the content to pdf and send as attachment.

 Can any one please help me inorder to achieve the same.



Thanks in advance
Jai
Kostadin
Telerik team
 answered on 09 Jan 2014
1 answer
102 views
Hi,

I Need to export the radgrid content to pdf on button click and need to send that pdf as an attachment in mail.

 The button is placed outside the grid. i used the following code but it prompts "Do you want to open or save?".
RadGrid1.GridExporting += new OnGridExportingEventHandler(RadGrid1_GridExporting);
            RadGrid1.ExportSettings.FileName = FileName;
           
            RadGrid1.MasterTableView.ExportToPdf();

 

For my requirement i need to export the content to pdf and send as attachment.

 Can any one please help me inorder to achieve the same.

 

 

Thanks in Advance
Jai
Kostadin
Telerik team
 answered on 09 Jan 2014
5 answers
213 views
I have a tree control where the nodes are loading via ServerSideCallback. The structure is basically Regions, States, and Markets. Most of the time, the Markets are simply a list of nodes with checkboxes. However, on some Markets I need to display both a checkable list and a clickable map.

So, for example, I have created a user control that contains TabStrip and MultiPage controls... one page contains the map, and the other contains a CheckboxList of markets. When this user control is displayed, however, I get a client-side alert stating that "Script control 'Tabs_XXXXX' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name scriptControl." How should I handle this?????

Two other notes: If I add simple controls into the template (i.e. labels), instead of something 'complicated' (like the TabStrip), then everything works fine. Second, not sure if this is needed or not, but based on the documentation, I am instantiating the User Control in the Page.Init event.
Kostadin
Telerik team
 answered on 09 Jan 2014
3 answers
90 views
On the instructions: this.Page.RenderControl (hw) I receive: Script control 'RadGrid' is not a registered script control. Script controls must be registered using RegisterScriptControl () Before calling RegisterScriptDescriptors (). 
How can I fix this?
Kostadin
Telerik team
 answered on 09 Jan 2014
1 answer
49 views
Hi. I have a radgrid. I show my records on it and also I use edit and delete processes on grid. It is shown like below link when I click "Duzenle"- that means Edit- . In third row, I clicked Duzenle button and, a sub row is opened for edit. I don't want to show this edit row. I solved this problem before. But now, I could not find how I do this. Thanks in advance.

Below link is attached image file that shows my problem.
http://www.hizliresimyukle.com/images/2014/01/07/x2OU.png

Maria Ilieva
Telerik team
 answered on 09 Jan 2014
1 answer
79 views
Hi. I have a radgrid. I show my records on it and also I use edit and delete processes on grid. It is shown like below link when I click "Duzenle"- that means Edit- . In third row, I clicked Duzenle button and, a sub row is opened for edit. I don't want to show this edit row. I solved this problem before. But now, I could not find how I do this. Thanks in advance.

Below link is attached image file that shows my problem.
http://www.hizliresimyukle.com/images/2014/01/07/x2OU.png
Maria Ilieva
Telerik team
 answered on 09 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?