This is a migrated thread and some comments may be shown as answers.

Catching Exceptions

1 Answer 64 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Benny
Top achievements
Rank 1
Benny asked on 26 Jul 2010, 06:31 PM
I'm trying to do something similar with the Schedular to what's done with the DataGrid in this .
http://www.telerik.com/help/aspnet-ajax/grdlinqtosqlbindingcrudoperations.html example.

// Something like this but on the Schedular
protected void RadGrid1_ItemUpdated(object source, GridUpdatedEventArgs e)
       {
           if (e.Exception != null)
           {
               e.ExceptionHandled = true;
               ShowErrorMessage();
           }
       }


Is there any way of catching exceptions thrown from the persisting classes. I have the following check done and like to catch the exception and show it for the user when editing an appointment.

private void CheckPermission(DataContext db)
    {
        if (db.Projects.Where(p => p.id == this.project).Single().ProjectUsers.Where(p => p.user == AdUser.UserNr && p.isAdmin == true).Count() == 0)
        {
            throw new Exception(String.Format("No permission ({0})!", AdUser.Name));
        }
    }

Is there any other way to solve this then implementing all the inserting/updating and deleting in AppointmentInsert, AppointmentUpdate, AppointmentDelete

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 29 Jul 2010, 01:50 PM
Hello Benny,

Thank you for this question. We have replied to your support ticket, but here is the answer for community reference:

'If I understand you correctly, you need RadScheduler's event arguments to carry info for the exception. Currently, this is not supported, but I will log it and we will consider implementing such a feature. '


Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Benny
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or