I have given up returning the error from my custo provider. What i notice was that the scheduler still executed the page level AppointmentInsert event. So i checked my resource values if any does not meet my criteria i cancel the command but when i try to throw up an erro message it gets swallowed and never makes it to the client.
This is an example of my code to check my resource values which i retreived on ITEM COMMAND which gets executed before most commands
Private Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert
Try
Dim err As String = ""
e.Appointment.Resources.GetResourceByType(
"Users").Text = Membership.GetUser.UserName
If Me.LocationCombox.ToString.Equals("") Then
err = err +
" Location Required <br/>"
End If
If Me.ActivityCombox.ToString.Equals("") Then
err = err +
" Activity Required <br/>"
End If
If Me.ColorCombox.ToString.Equals("") Then
err = err +
" Color Required <br/>"
End If
If Me.CalendarCombox.ToString.Equals("") Then
err = err +
" Calendar Required <br/>"
End If
If Not err.Equals("") Then
Throw New ArgumentNullException(err)
End If
Catch ex As Exception
Page.ClientScript.RegisterStartupScript(
Me.GetType(), "MyScript", _
"function AlertHello() { alert(' " + ex.Message + "'); }", True)
e.Cancel =
True
End Try
End Sub