I call the EditRecurrenceDialog dialog from a custom editappointment dialog from the buttonRecurrence button.
EditRecurrenceDialog os displayed correctly and I can edit as expected, I click the OK buttin and diag reult is NONE. Screen is reshown and I repeat making selections and click OK button again and result is now OK and rule is created.
Why does OK button result is None first time? Here is complete code for buttonRecurrence
Note: customAppt is scheduler mapped fields and custom fields loaded in single object
private void buttonRecurrence_Click(object sender, EventArgs e){
customAppt.RecurrenceRule = recurrenceRule;
using (EditRecurrenceDialog recurrenceDialog = new EditRecurrenceDialog(customAppt))
if (recurrenceDialog.ShowDialog() == DialogResult.OK)
{
var updatedRule = customAppt.RecurrenceRule;
lblRecur.Text = updatedRule.ToString();
recurrenceRule = customAppt.RecurrenceRule;
}
}
