
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.RadScheduler.OnFormCreating(Appointment appointment, SchedulerFormMode mode) +110
Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +448
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +132
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
Any ideas on what could be causing this? Let me know if you need more info.
Thanks,
Trevor
protected
void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
{
if (e.Appointment.Resources.GetResourceByType("Property") == null)
{
string script = "<script type=\"text/javascript\">alert('Please select property');</script>";
if (!Page.ClientScript.IsClientScriptBlockRegistered("ValidateProperty"))
Page.ClientScript.RegisterClientScriptBlock(Page.GetType(),
"ValidateProperty", script);
e.Cancel =
true;
}
}
Hi, I write above code in appointmentInsert event of radscheduler. I want to check for resource value and if "property" resource have null value then i want cancel insert of appointment and also want to raise error message to user. For that i am registering for client script but its not raising Messagebox, it seems javascript method is not executing itself. Am i missign someting to make it work properly. I am using
RadAjaxLoadingPanel and RadAjaxManager on ASPX page.
What i want it to do is have it so when i click on Save in the toolbar it first checks if all the controls are validated in the Panel bar and if not focus on the first control not found.
Even better is if this validation could occur on the client side before postback.
I tried to set it up as per the example in the demo of the Toolbar using the ValidationGroups but it doesn't work as i suppose the Validators in the Panel Items aren't visible to the Toolbar.
I can explicitly fire the Validator using the demo example in the Panelbar validation section, but i don't want to post back if i can help it.
any ideas?
Jordan