SchedulerExtension.HasErrors(String) Method
Returns a value that indicates whether or not there were errors during the current operation.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v26.1.dll
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| name | String | A string containing the name of a control to check for errors. |
Returns
| Type | Description |
|---|---|
| Boolean | true, if there were errors during the current operation; otherwise, false. |
Remarks
Use the HasErrors method to check whether or not there were errors during the current operation (inserting or updating an appointment) and prevent inserting invalid records into the underlying data source.
The code sample below illustrates the use of the HasErrors method.
CustomAppointment[] insertedAppts = SchedulerExtension.GetAppointmentsToInsert<CustomAppointment>(SchedulerDataHelper.GetSchedulerSettings(), appointmnets, resources);
if(!SchedulerExtension.HasErrors("scheduler"))
SchedulerDataHelper.InsertAppointments(insertedAppts);
See Also