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?
*** 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:
Solution:
<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.
How do I show a text e.g. "No appointments to display" if there is no appointment selected time period?
Uses Agenda view...
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();
}
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
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)
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; |
} |
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; } |
} |
} |
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) |