RadWindow.Confirm() and ESC key

7 posts, 1 answers
  1. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 17 May 2012 Link to this post

    Hi,

    Pressing ESC key sets DialogResult to true. I expected it to be null or at least false... Is it a bug?
  2. Antoniy
    Antoniy avatar
    7 posts
    Member since:
    May 2012

    Posted 21 May 2012 Link to this post

    Same here, very frustrating!
  3. DevCraft banner
  4. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 May 2012 Link to this post

    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 >>
  5. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 22 May 2012 Link to this post

    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
  6. Antoniy
    Antoniy avatar
    7 posts
    Member since:
    May 2012

    Posted 22 May 2012 Link to this post

    Pressing ESC should be treated as pressing the close (x) button and so must return null.
  7. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 23 May 2012 Link to this post

    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 >>
  8. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 23 May 2012 Link to this post

    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.
Back to Top
DevCraft banner