Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
649 views

Hello,
I am using a RadGrid with EditFormSettings EditFormType="Template". 
I would like to add inside the <FormTemplate> a user control that resides in another library that I had created as an embedded resource library as described here: https://www.codeproject.com/kb/user-controls/embeddedusercontrol.aspx.
The problem I'm facing is that  when trying to display the edit form, in  Page_Load event inside my user control,  all inner components (textboxes, radwindows, etc.) are null. 
What am I doing wrong? 

Another alternative I had thought about would be to wrap my formtemplate in a usercontrol that I would like to store in my controls library. In this case, 
what would be the UserControlPath? I have found an example with applications root reference (UserControlPath="~/WebUserControl.ascx"), but I was not able to point it to a different assembly.
Is there any way of creating the user control in code behind and set it to the grid edit form?

Any help would be appreciated. Thanks in advance.
Rumen
Telerik team
 answered on 19 Oct 2017
3 answers
667 views

hi

I need older  version

Telerik Reporting Version=4.2.10.1221

Telerik.Web.UI Version=2012.2.607.40

where can i find download link?

Thank you in advance.

Massimo

 

 

Kathryn
Telerik team
 answered on 19 Oct 2017
0 answers
126 views

Hi there.

We're working on a project with RadGrid controls that are doing batch updates.

The event that we have attached to the update event (RadGridActionGroup_UpdateCommand) has 2 parameters where we're sending to the db for updates.

protected void RadGridActionGroup_UpdateCommand(object sender, GridCommandEventArgs e)
   {
       try
       {
           Hashtable newValues = (e.CommandArgument as GridBatchEditingEventArgument).NewValues;
 
           performActionGroupModelUpdate(newValues);
       }
       catch (Exception ex)
       {
           ConfigurationController.AddMessage(ex.Message.ToString());
       }
   }

 

When a user updates only one field in a row of say, five values, I would expect that only changed values would be sent to this event method, however even though only one field was changed, all of the values (updated as well as non-updated) are sent to to this event.

Is this by design or am I doing something wrong?

 

Thanks in advance

JazzBox
Top achievements
Rank 1
 asked on 19 Oct 2017
1 answer
186 views

Hello,

I am using a RadSearchBox with   MinFilterLength="3". I am interested in filtering my search in OnDataSourceSelect, but even when I type 4 characters, this method: 
   protected void RadSearchBox1_DataSourceSelect(object sender, Telerik.Web.UI.SearchBoxDataSourceSelectEventArgs e)
        {
            string searchText = e.FilterString;
           
        }
e.FilterString.Length returns 3 and RadSearchBox1.Text.Length is also 3 inside the method RadSearchBox1_DataSourceSelect

This is not narrowing enough my result set and I do not want to set MinFilterLength="4" because I have to allow also searchs by 3 characters.
Any suggestion will be welcome. Thanks in advance.

Peter Milchev
Telerik team
 answered on 19 Oct 2017
17 answers
883 views
I'm using RadEditor to create document that will be converted in PDF.

How to set in RadEditor the page format size (e.g. A4) and how to set a page break ?

Thanks.

A.
Rumen
Telerik team
 answered on 19 Oct 2017
4 answers
324 views
Hi,

   How to achieve the following scenario.

  1. Tool-tip position in RadHtmlChart - bar and column series.
  2. how to set border width to series item - bar and column series.
  3. how to set smooth edge in column and bar chart.

Technical details:

Version: Telerik.Web.UI.dll 2013.2.730.40
Operating System: windows 7
.Net Framework: 4.0
Visual studio: 2010
Browser: Firefox 26.0



Kulveer
Top achievements
Rank 1
 answered on 19 Oct 2017
5 answers
250 views

I found that if adding hyperlink with InsertLink dialog in editor, and fill in long Link Text e.g. "Test 123456789012345678901234567890"

The link text could not be change with InsertLink dialog again.

Rumen
Telerik team
 answered on 18 Oct 2017
1 answer
221 views

I have not added any specific wav file in local, or any web config changes done in my local, still it is working in my local.

After deployement audio is not working.

Could you please let me what is the issue.

Code snippet:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 <tr>
                                        <td style="width: 545px; height: 50px" id="tdtblCaptcha">
                                            <table id="tblCaptcha" border="0" cellpadding="0" cellspacing="0" runat="server">
                                                <tr>
                                                    <td>
                                                        <telerik:RadScriptManager ID="ScriptManager1" runat="server">
                                                        </telerik:RadScriptManager>
                                                        <telerik:RadCaptcha ID="RadCaptchaRegistration" runat="server" ErrorMessage="You have entered an invalid code" ValidationGroup="Group"
                                                            EnableRefreshImage="true" CaptchaImage-EnableCaptchaAudio="true" ForeColor="Red">
                                                        </telerik:RadCaptcha>
                                                    </td>
                                                    <td align="left" valign="top" style="padding-top: 28px">
                                                        <telerik:RadToolTip ID="Tooltip1" runat="server" IsClientID="true" TargetControlID="btnRefreshImage">Refresh Image</telerik:RadToolTip>
                                                        <input type="button" id="btnRefreshImage" onclick="RefreshImage(); return false;" aria-label="Refresh Captcha"
                                                            value="" />
                                                    </td>
                                                </tr>

                                            </table>
                                        </td>
                                    </tr>

 

Rumen
Telerik team
 answered on 18 Oct 2017
1 answer
247 views

We have been using the RadScheduler in our system for a couple of years. About 1 month ago our customers started reporting a bug when editing appointments. In Chrome when the a scheduler appointment is resized or moved it works the first time, but subsequent changes have no effect, as if the postback isn’t happening.

Occasionally we also see this js error popping up in the browser console.
Uncaught TypeError: Cannot read property ‘viewPartIndex’ of null
At a.DayModel._getTimeFromIndex ….

After 3 days of investigation we’ve still not managed to resolve the issue, however, interestingly we've found that removing  <!DocType html> to put the browser in 'quirks mode' for Chrome improves the bug but obviously this isn’t a solution!

 

We’ve tried 3 version of the Telerik.Web.UI (2015.2.623.45, 2015.3.1111.45, and 2017.3.913.45). The error appears in all.

It seems the issue has been raised lots of times previously but as far as I can tell Telerik have never resolved it?

http://www.telerik.com/forums/radscheduler---violation-forced-reflow-while-executing-javascript-took-n-ms
https://feedback.telerik.com/Project/108/Feedback/Details/64138-scheduler-appintment-duration-gets-reduced-on-appointment-being-dragged-and-dropp
https://feedback.telerik.com/Project/108/Feedback/Details/198638-drag-and-drop-of-the-appointments-does-not-work-correctly-when-the-scheduler-is-i

http://www.telerik.com/forums/schedulerformcreated-error

 

Any advice would be greatly appreciated as it's affecting a large number of our customers. 

 

We’ve reproduced the error in a very basic demo (see below) to discount anything in our code.

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Default" CodeFile="Default.aspx.cs"  %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="demo-container no-bg">
        <telerik:RadScheduler
            runat="server"
            ID="RadScheduler1"
            OnAppointmentInsert="RadScheduler1_AppointmentInsert"
            OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentDelete="RadScheduler1_AppointmentDelete"
            DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
            Width="100%" Height="1800px">
            <AdvancedForm Modal="true"></AdvancedForm>
            <TimelineView UserSelectable="false"></TimelineView>
            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

 

Default.aspx.cs

using System;
using System.Collections.Generic;
using Telerik.Web.UI;
 
 
public partial class Default : System.Web.UI.Page
{
    private const string AppointmentsKey = "Telerik.Web.Examples.Scheduler.BindToList.CS.Apts";
 
    private List<AppointmentInfo> Appointments
    {
        get
        {
            List<AppointmentInfo> sessApts = Session[AppointmentsKey] as List<AppointmentInfo>;
            if (sessApts == null)
            {
                sessApts = new List<AppointmentInfo>();
                Session[AppointmentsKey] = sessApts;
            }
 
            return sessApts;
        }
    }
 
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
 
        if (!IsPostBack)
        {
            Session.Remove(AppointmentsKey);
 
            InitializeResources();
            InitializeAppointments();
        }
 
        RadScheduler1.DataSource = Appointments;
    }
 
    protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
    {
        Appointments.Add(new AppointmentInfo(e.Appointment));
    }
 
    protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
    {
        AppointmentInfo ai = FindById(e.ModifiedAppointment.ID);
        RecurrenceRule rrule;
        if (RecurrenceRule.TryParse(e.ModifiedAppointment.RecurrenceRule, out rrule))
        {
            rrule.Range.Start = e.ModifiedAppointment.Start;
            rrule.Range.EventDuration = e.ModifiedAppointment.End - e.ModifiedAppointment.Start;
            TimeSpan startTimeChange = e.ModifiedAppointment.Start - e.Appointment.Start;
            for (int i = 0; i < rrule.Exceptions.Count; i++)
            {
                rrule.Exceptions[i] = rrule.Exceptions[i].Add(startTimeChange);
            }
            e.ModifiedAppointment.RecurrenceRule = rrule.ToString();
        }
 
        ai.CopyInfo(e.ModifiedAppointment);
    }
 
    protected void RadScheduler1_AppointmentDelete(object sender, SchedulerCancelEventArgs e)
    {
        Appointments.Remove(FindById(e.Appointment.ID));
    }
 
    private void InitializeResources()
    {
        ResourceType resType = new ResourceType("User");
        resType.ForeignKeyField = "UserID";
 
        RadScheduler1.ResourceTypes.Add(resType);
        RadScheduler1.Resources.Add(new Resource("User", 1, "Alex"));
    }
 
    private void InitializeAppointments()
    {
        DateTime start = new DateTime(2017, 10, 11).AddHours(12);
        Appointments.Add(new AppointmentInfo("Meeting with Alex", start.AddHours(-2), start.AddHours(3), string.Empty, null, string.Empty, 2));
    }
 
    private AppointmentInfo FindById(object ID)
    {
        foreach (AppointmentInfo ai in Appointments)
        {
            if (ai.ID.Equals(ID))
            {
                return ai;
            }
        }
 
        return null;
    }
}
 
class AppointmentInfo
{
    private readonly string _id;
    private string _subject;
    private DateTime _start;
    private DateTime _end;
    private string _recurrenceRule;
    private string _recurrenceParentId;
    private string _reminder;
    private int? _userID;
 
    public string ID
    {
        get
        {
            return _id;
        }
    }
 
    public string Subject
    {
        get
        {
            return _subject;
        }
        set
        {
            _subject = value;
        }
    }
 
    public DateTime Start
    {
        get
        {
            return _start;
        }
        set
        {
            _start = value;
        }
    }
 
    public DateTime End
    {
        get
        {
            return _end;
        }
        set
        {
            _end = value;
        }
    }
 
    public string RecurrenceRule
    {
        get
        {
            return _recurrenceRule;
        }
        set
        {
            _recurrenceRule = value;
        }
    }
 
    public string RecurrenceParentID
    {
        get
        {
            return _recurrenceParentId;
        }
        set
        {
            _recurrenceParentId = value;
        }
    }
 
    public int? UserID
    {
        get
        {
            return _userID;
        }
        set
        {
            _userID = value;
        }
    }
 
    public string Reminder
    {
        get
        {
            return _reminder;
        }
        set
        {
            _reminder = value;
        }
    }
 
    private AppointmentInfo()
    {
        _id = Guid.NewGuid().ToString();
    }
 
    public AppointmentInfo(string subject, DateTime start, DateTime end,
        string recurrenceRule, string recurrenceParentID, string reminder, int? userID) : this()
    {
        _subject = subject;
        _start = start;
        _end = end;
        _recurrenceRule = recurrenceRule;
        _recurrenceParentId = recurrenceParentID;
        _reminder = reminder;
        _userID = userID;
    }
 
    public AppointmentInfo(Appointment source) : this()
    {
        CopyInfo(source);
    }
 
    public void CopyInfo(Appointment source)
    {
        Subject = source.Subject;
        Start = source.Start;
        End = source.End;
        RecurrenceRule = source.RecurrenceRule;
        if (source.RecurrenceParentID != null)
        {
            RecurrenceParentID = source.RecurrenceParentID.ToString();
        }
 
        if (!String.IsNullOrEmpty(Reminder))
        {
            Reminder = source.Reminders[0].ToString();
        }
 
        Resource user = source.Resources.GetResourceByType("User");
        if (user != null)
        {
            UserID = (int?)user.Key;
        }
        else
        {
            UserID = null;
        }
    }
}
Peter
Top achievements
Rank 1
 answered on 18 Oct 2017
1 answer
265 views

I'm trying to figure out what method this error is coming from (Full error text at bottom below code snippet). Our global.asax records every error in our site, and this comes up on a regular basis. Nobody has reported an issue, nor can I reproduce it any way I've attempted. It has come up a few times a day until last month, where it suddenly started showing up 50-100 times a day, around when the latest chrome update came out. It seems like every time, the browser info is the newest version of Chrome as of today (Chrome/61.0.3163.100).

From what I can tell in the error message, it seems it's during resize while on the week view. I use scheduler method OnAppointmentUpdate to resize via server side. In theory, my try/catch there should handle this error, but I never get my error email, so it must be coming up prior to hitting that method. 

If anyone has any ideas, I would appreciate any insight.

Here is my OnAppointmentUpdate method:

protected void Schedule_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
  {
    try
    {
      Appointment oAppt = e.ModifiedAppointment;

      if (e.Appointment.Start >= e.Appointment.End)
      {
        e.Cancel = true;        
        Notify.Error(this.Page, "Start time must be before end time.");
        return;
      }
      
        if (!EditAppointmentViaResizeMove(oAppt, ""))
          e.Cancel = true;        
      }
    }
    catch (Exception ex)
    {
      SendErrorEmail("Error on appointment update: " + ex.Message));
    }
  }

And, this is the message that hits my global.asax error handler:

 

Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.portal_appointments_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Inner Exception 1: Appointment is invalid: Start time must be before the End time.

Inner Trace 1: at Telerik.Web.UI.Appointment.Validate() at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate) at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment) at Telerik.Web.UI.RadScheduler.FinishResize(Appointment originalAppointment, Appointment modifiedAppointment) at Telerik.Web.UI.RadScheduler.ResizeAppointment(Appointment appointmentToResize, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.RadScheduler.Telerik.Web.UI.IScheduler.HandleResize(Appointment appointmentToResize, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.Week.Model.HandleResize(Appointment appointment, ISchedulerTimeSlot sourceSlot, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Model.HandleResize(Appointment appointment, ISchedulerTimeSlot sourceSlot, DateTime appointmentStart, DateTime appointmentEnd, Boolean editSeries) at Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

BROWSER INFO:

Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Peter Milchev
Telerik team
 answered on 18 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?