Hello community!!!
I am working on a small project with a "RadForm" which contains a "RadPageView". This "RadPageView" has been set to "NavigationView" mode. It contains four pages (RadPageViewPage) and one of them is "Settings" page.
What I am trying to do is...
When user makes any change on settings page and try to change page, takes a message. If user choose to save changes, program saves changes. Else just goes to clicked page.
My problem is...
As you can see in my code, I want user to remain in settings page when choose to save changes ( Main_radPageView.SelectedPage = Settings_radPageViewPage; ). In my code, program saves the changes but it goes to the page which clicked before!!!
private void Settings_radPageViewPage_VisibleChanged(object sender, EventArgs e)
{
if (!Settings_And_SettingsFields_AreEqual())
{
DialogResult Dialog_Result = RadMessageBox.Show(this, "You have make changes on settings. Do you want to save them?", "Message", MessageBoxButtons.YesNo, RadMessageIcon.Info);
if (Dialog_Result == DialogResult.Yes)
{
// Code...
Main_radPageView.SelectedPage = Settings_radPageViewPage;
}
else
{
// Code...
}
}
}
Thank you for your time!!!
Maybe you can use this.
private void radPageView1_SelectedPageChanging(object sender, RadPageViewCancelEventArgs e) { e.Cancel = true; }