Hello,
I have a problem with the RadScheduler control. When I move an appointment, sometime, the new start time is false…
I test with args.get_newStartTime() (client side) and e.ModifiedAppointment.Start (server side) and the twice send me the same value.
<
telerik:RadScriptBlock
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function onAppointmentMoveEnd(sender, args)
{
alert(args.get_newStartTime());
}
</
script
>
</
telerik:RadScriptBlock
>
<
div
>
<
telerik:RadScheduler
OnClientAppointmentMoveEnd
=
"onAppointmentMoveEnd"
runat
=
"server"
ID
=
"schPlanning"
DataKeyField
=
"Libelle"
DataSubjectField
=
"SujetEvenement"
DataDescriptionField
=
"Libelle"
DataStartField
=
"Debut"
DataEndField
=
"Fin"
Height
=
"1000px"
>
</
telerik:RadScheduler
>
</
div
>
public
partial
class
Calendrier : Page
{
private
void
schPlanning_AppointmentUpdate(
object
sender, AppointmentUpdateEventArgs e)
{
DateTime newStartTime = e.ModifiedAppointment.Start;
// Alert(newStartTime)
}
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
schPlanning.AppointmentUpdate +=
new
AppointmentUpdateEventHandler(schPlanning_AppointmentUpdate);
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
List<Evenement> evenements =
new
List<Evenement>();
evenements.Add(
new
Evenement(
"Sujet"
,
"Libelle"
, DateTime.Now.Date.AddHours(15), DateTime.Now.Date.AddHours(17)));
schPlanning.DataSource = evenements;
}
}
}
public
class
Evenement
{
public
string
SujetEvenement {
get
;
set
; }
public
string
Libelle {
get
;
set
; }
public
DateTime Debut {
get
;
set
; }
public
DateTime Fin {
get
;
set
; }
public
Evenement(
string
sujetEvenement,
string
libelle, DateTime debut, DateTime fin)
{
SujetEvenement = sujetEvenement;
Libelle = libelle;
Debut = debut;
Fin = fin;
}
}
I join a screenshot when I have the error.
Information:
- Telerik 2013.2.717.35
- Internet Explorer 9.0.8112.16421
Sorry for my approximate English, I’m French.
Jérémy