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

RadWindow Alert not closing when launched from a global mother page

1 Answer 51 Views
Window
This is a migrated thread and some comments may be shown as answers.
Yolanda
Top achievements
Rank 1
Yolanda asked on 25 Jan 2011, 03:01 PM
Hello,
I have created a mother page which all the pages heritates from.
The goal of this mother control page is to avoid user to leaves a page if they are editing data inside. Ex: the user is editing data shown in a RadGridView and then he leaves the page before leaving.

The mother page is implemented like this

public partial class MotherPage : Page
    {
        protected bool _isEditing;
        public MotherPage()
        {
            InitializeComponent();
        }
 
        // S'exécute lorsque l'utilisateur navigue vers cette page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
 
        protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e)
        {
            if (_isEditing)
            {
                e.Cancel = true;
                RadWindow.Alert(new DialogParameters()
                {
                    Header = "Attention !",
                    Content = "Vous êtes en cours de modification !" + Environment.NewLine +
                    "Enregistrer ou annuler vos modifications avant de continuer"
                });
            }
            else
            {
               base.OnNavigatingFrom(e);
            }
        }
    }

The variable _isEditing is setted to true when data in the child pages is being edited.


The problem is, when the RadWindow is launched the Window doesn't close if the user clicks on OK, he must click on the small cross in the upper right corner.
Why this happens?

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 31 Jan 2011, 08:20 AM
Hi Yolanda,

Thank you for contacting us.

Could you please try to reproduce this issue in a sample project and send it to us, in order to track down the source of the problem. We tried to reproduce it at our side, but to no avail. It will be very helpful for resolving  the issue, if you could send us a sample project, which we can run here locally.

Looking forward to your reply.

All the best,
Konstantina
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Window
Asked by
Yolanda
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or