Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
106 views

I build custom context menus at runtime for each appointment.  The menus work fine, I get the AppointmentContextMenuItemClicked event and am able to act on the menu option chosen, but the UI drops all of the custom menus.  The next time I right-click on any appointment, it only has Edit and Delete options.  I've tried Rebind() at the end of the AppointmentContextMenuItemClicked, but it does not refresh, and even if I call databind and step through the code where it reconstructs all of the menus, they still do not show up in the browser.  Anyone dealt with this?

tbrentlong
Top achievements
Rank 1
 asked on 03 Jun 2021
1 answer
441 views

*** Update from 17 Jan 2018 ***

The problem discussed below has been fixed in R1 2018 (2018.1.117).

*** End of update ***

The new Chrome 61 introduces some breaking changes which may lead to some of the following errors when the browser is scrolled and the resize handler of an appointment is clicked:

  • Uncaught TypeError: Cannot read property ‘viewPartIndex’ of null

  • Sys.WebForms.PageRequestManagerServerErrorException: Appointment Start time must be before the End time

  • Uncaught TypeError: Cannot read property 'cells' of undefined

  • Uncaught TypeError: Cannot read property 'resizeFromStart' of null

  • Uncaught TypeError: Cannot read property 'intervalIndex' of null;


Solution:

Placing the following JavaScript override before the declaration of the Scheduler should resolve all of the above issues:  

<script type="text/javascript">
    Telerik.Web.UI.RadScheduler.prototype._compensateScrollOffset = function(contentTable) {
        //In Chrome and Safari document.documentElement.scrollTop is always 0, due to a browser bug
        //In Internet Explorer there is no "document.scrollingElement"
        var scrollingElement;
        if ($telerik.isSafari || $telerik.isChrome) {
            scrollingElement = document.body.scrollTop <= document.scrollingElement.scrollTop ? document.scrollingElement : document.body;
        }
 
        var bodyOffsetElement = scrollingElement ? scrollingElement : document.documentElement,
        bodyScrollOffset = $telerik.getScrollOffset(bodyOffsetElement, false),
        scrollOffset = $telerik.getScrollOffset(contentTable, true);
 
        scrollOffset.x -= bodyScrollOffset.x;
        scrollOffset.y -= bodyScrollOffset.y;
 
        contentTable.targetRect.x += scrollOffset.x;
        contentTable.targetRect.y += scrollOffset.y;
 
        // The Safari issue here could be a problem in getLocation (used in getBounds). This code offsets it
        //if($telerik.isSafari3 || $telerik.isSafari4 || $telerik.isChrome)
        //{
        //    contentTable.targetRect.x += scrollOffset.x;
        //    contentTable.targetRect.y += scrollOffset.y;
        //}
    }
</script>


<telerik:RadScheduler runat="server" ID="RadScheduler1" ... >

If any other issues are observed in Chrome 61+ environment, please share them along with more details and specific examples of the reproduction steps so we can update the information here. 

For more information on the Google Chrome update and any issues with the position of ToolTips and ContextMenus, you may refer to http://www.telerik.com/forums/wrong-placement-of-radcontextmenu-in-chrome-61

Vessy
Telerik team
 answered on 25 May 2021
0 answers
79 views

How do I show a text e.g. "No appointments to display" if there is no appointment selected time period?

Uses Agenda view... 

Kjell
Top achievements
Rank 1
Iron
 updated question on 17 May 2021
2 answers
27 views

I would like to set some attributes to each group by item when binding the scheduler with appointments, filtered by some criterion.

My aim is to ultimately access this attribute via the DOM to then do further logic.

E.g.

'VB.Net
schedule.GroupBy = "FoodType"
 
'Other code...
 
Private Sub schedule_ResourceGroupByItemDataBound(sender As Object, e As EventArgs)
  Dim group = e.Item
  group.Attributes.Add("data-foodtypeid", group.Value)
End Sub
// Example case on the client
function schedule_Load(sender, args) {
  $("schedule [data-foodtypeid='1']").hide();
}

 

 

Matthew
Top achievements
Rank 1
Veteran
 answered on 22 Apr 2021
8 answers
522 views
HI All,

I have gone throught the Article http://www.telerik.com/support/kb/aspnet-ajax/scheduler/setting-special-days-or-time-slots-in-radscheduler.aspx

But I have different requirement. I am using Scheduler only for View mode.
Suppose I have created a recurring appointment between 12PM- 4PM for one month.I have to enable Only this slot of (12PM-4PM) enable and all other slots disable.
Please let me know of any other event than TimeSlotCreated.

Thanks
Prashant
Sen
Top achievements
Rank 1
 answered on 14 Mar 2021
9 answers
29 views

 

Just use the radscheduler scenario for a service and it works inserting detailed info via 4.0, but with 4.5 .net it gets the following error:

 

(How do I get around this??)

(also - I notice 4.5 doesnt display any tooltip type message liek 4.0 does, and if I type somehting in the simple form subject and hit options, in 4.0 it carries what I typed to the options screen, but 4.5 does not - something is disconnected??)

 

Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +38 Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +316 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +127 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +168 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9858028 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1696

mike
Top achievements
Rank 1
 answered on 26 Feb 2021
8 answers
384 views
Hi,

I have a custom edit form. I open it up by setting OnClientAppointmentEditing="OpenEditSchedulePopup".

In my page I have some dropdownlists which are used to filter the data in the RadSchedule. I use a RadAjaxManager so that when the dropdown selection is changed the RadSchedule is updated via Ajax.

I would like to get the same effect when the Custom Edit Popup is closed. I have noticed that when the standard edit form is closed it uses Ajax to rebind the RadScheduler. How do I get my custom Edit popup form to use ajax to update the radscheduler when it is closed?

The standard edit form is doing it so I am sure it is possible.
n/a
Top achievements
Rank 1
Veteran
 answered on 17 Feb 2021
5 answers
60 views
I have three resources added and when someone creates and saves an appointment I want the resource to be required, is there and easy way to do this? Is this functionality built in?
Peter Milchev
Telerik team
 answered on 16 Feb 2021
6 answers
51 views

     I use this sample:

https://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx?_ga=2.107659522.1423900032.1612185078-422710438.1602686251

It works fine.

I upgrade to .net 4.65 (and use the .45 version of the control)

 

When you go to the advanced form and save - it just sits there forever.

 

I posted another issue that I THOUGHT was just with a service, looks like thats not the case. Looks like scheduler 4.5 version simply does not work. This is in latest and back to 2019 Q1 version (I dont have any earlier than that) 

mike
Top achievements
Rank 1
 answered on 05 Feb 2021
7 answers
402 views
Hello!

Is there possibility to expand RecurrenceRule in C# instead of using SQL UDF (provided here: http://www.telerik.com/community/forums/aspnet-ajax/scheduler/sql-reporting-display-all-recurring-appointments.aspx)?

For example I have List of type Appointment and I want to expand Recurrences in elements which have RecurrencyRule != null so the result will be List of upcoming events ordered by Start attribute.

Is this possible?

Thanks in advance

EDIT:

I've opened ExpandRecurrence_UDF zip file from post about SQL UDF and I've found function which returns occurences for RecurrenceRule string but when I try to parse my RecurrenceRules which are being parsed by SQL UDF function I can't get this make to work under C#.

Function:

        public static IEnumerable ExpandRecurrence(string recurrenceRule, DateTime rangeStart, DateTime rangeEnd) 
        { 
            List<OccurrenceInfo> occurrences = new List<OccurrenceInfo>(); 
            RecurrenceRule rrule; 
            if (RecurrenceRule.TryParse(recurrenceRule, out rrule)) 
            { 
                rrule.SetEffectiveRange(rangeStart, rangeEnd); 
                foreach (DateTime occStart in rrule.Occurrences) 
                { 
                    OccurrenceInfo info = new OccurrenceInfo(occStart, occStart.Add(rrule.Range.EventDuration)); 
                    occurrences.Add(info); 
                } 
            } 
 
            return occurrences; 
        } 

Occurences class:

public class OccurrenceInfo 
    private DateTime start; 
    private DateTime end; 
 
    public OccurrenceInfo(DateTime start, DateTime end) 
    { 
        this.start = start; 
        this.end = end; 
    } 
 
    public DateTime Start 
    { 
        get { return start; } 
        set { start = value; } 
    } 
 
    public DateTime End 
    { 
        get { return end; } 
        set { end = value; } 
    } 

Sample RecurrenceRule string which I'm tryign to parse:

RecurrenceRule.TryParse("DTSTART:2008422T000000Z\nDTEND:2008423T000000Z\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTHDAY=22;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYMONTH=04\n"out rrule) 

I've tryed to use Replace function to convert \n to Environment.NewLine but it was returning false too.

EDIT2: I've found bug in my RecurrencyRule string. Month in DTSTART and DTEND was in X format (for months 1-9) instead of XX

Marin Bratanov
Telerik team
 answered on 05 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?