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

RadWindow.Confirm() and ESC key

6 Answers 146 Views
Window
This is a migrated thread and some comments may be shown as answers.
vk
Top achievements
Rank 1
vk asked on 17 May 2012, 07:01 AM
Hi,

Pressing ESC key sets DialogResult to true. I expected it to be null or at least false... Is it a bug?

6 Answers, 1 is accepted

Sort by
0
Antoniy
Top achievements
Rank 1
answered on 21 May 2012, 03:45 PM
Same here, very frustrating!
0
Konstantina
Telerik team
answered on 22 May 2012, 09:49 AM
Hi,

The issue is fixed. You could download the latest internal build or upgrade to the Q2 2012 version, which release due in June.

Kind regards,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
vk
Top achievements
Rank 1
answered on 22 May 2012, 11:35 AM
Hi Konstantina,

Thanks for fixing the issue. Now it returns false. But since the DialogResult is nullable why not set it to null in a situation where the ESC button is pressed? For example, before closing my OOB window I check if there are any changes to data and ask a user to save or cancel changes using Confirm dialog. What if the user changes her mind and presses ESC in hope to stay and review changes she made? I could just check the result for null and cancel closing...

Thanks
0
Antoniy
Top achievements
Rank 1
answered on 22 May 2012, 04:02 PM
Pressing ESC should be treated as pressing the close (x) button and so must return null.
0
Accepted
Konstantina
Telerik team
answered on 23 May 2012, 01:22 PM
Hi,

We tried to implement the same behavior as the standard MessageBox. It behaves like so:
- when there is only OK button, what correspond to the RadAlert, pressing Esc key returns True, i.e. it presses the Ok button;
- when there are OK and Cancel buttons, what corresponds in Telerik to RadPrompt and RadConfirm, pressing Esc key returns False, i.e. presses the Cancel button.
And when the Close button (X) of the dialog is clicked that is when it is returned null.

All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
vk
Top achievements
Rank 1
answered on 23 May 2012, 01:59 PM
Hi,

I aggree with Antoniy that pressing ESC should be treated as pressing the Close button (x). But anyway I mark the thread as answered.

Thanks.
Tags
Window
Asked by
vk
Top achievements
Rank 1
Answers by
Antoniy
Top achievements
Rank 1
Konstantina
Telerik team
vk
Top achievements
Rank 1
Share this question
or