I want to drop an item on RadCaneldar and highlight the date/dates on which items are dropped.
On Server side Dayrender event I have writted the code like below where I am attaching 'OnDrop' event to the each cell.
Dim sDate As String = Convert.ToString(e.Day.Date)
e.Cell.Attributes.Add(
"ondragenter", "return fnCancelDefault();")
e.Cell.Attributes.Add(
"ondragover", "return fnCancelDefault();")
e.Cell.Attributes.Add(
"ondrop", "return GetSchedulerDroppedItem('RadCalMonth1','" & sDate & "');")
My client side function is,
function GetSchedulerDroppedItem(SchedulerName,droppeddate) {
var htmlElement = event.srcElement; //eventArgs.get_destinationHtmlElement
var SchedulerControl;
var hiddenDroppedSchedulerID = document.getElementById("ctl00_Content_hFieldDroppedSchedulerID");
else if (SchedulerName == "RadCalMonth1") {
SchedulerControl = document.
get('ctl00_Content_RadCalMonth1');
hiddenDroppedSchedulerID.value =
"RadCalMonth1";
}
var droppeddatetimecontrol = document.getElementById('ctl00_Content_hFieldDroppedDateTime');
droppeddatetimecontrol.value = droppeddate;
//// var ajaxmanager = $find("ctl00_RadAjaxManager1");
//// ajaxmanager.Request();
//__doPostBack('TestCntrl','');
PageMethods.UpdateJob_OnDrop(SchedulerControl);
}
In the above function I want to use postback function that will not cause full page to refresh.
In RadScheduler there is one event "InsertAppointment"
var
newAppointment = new Telerik.Web.UI.SchedulerAppointment();
var dt = new Date(timeSlot._startTime);
newAppointment.set_start(dt);
newAppointment.set_end(dt);
newAppointment.set_subject(
"");
SchedulerControl.insertAppointment(newAppointment);
This calls server side AppointmentInsert event of Scheduler and does not refreshes the page.
How can I achieve such thing for RadCalender?
Also, after post back I want to show the dropped date highlighted.
Can anyone help me in this?
Best Regards,
Hrushikesh