/// <summary> /// Update an exception item in the collection /// </summary> /// <param name="source">The source of the event</param> /// <param name="e">The event arguments</param> protected void dgExceptions_UpdateCommand(object source, DataGridCommandEventArgs e) { if (!Page.IsValid) { return; } RecurringObject ro = GetCurrentObject(); RecurrencePattern rpException = (RecurrencePattern)e.Item.FindControl("rpException"); Recurrence r = ro.ExceptionRules[e.Item.ItemIndex].Recurrence; r.Reset(); rpException.GetRecurrence(r); dgExceptions.EditItemIndex = -1; dgExceptions.DataSource = ro.ExceptionRules; dgExceptions.DataBind(); }