Eddy MINET
Posts: 4
Joined: 2006-09-26
|
Here is my actual Code :
private bool PageChanged = false;
...
void CVDOptionPage_Dirty(object sender, addinExpress.VSTO.ADXDirtyEventArgs e) {
e.Dirty = PageChanged;
}
private void CVDOptionPage_Apply(object sender, EventArgs e) {
PageChanged = false;
// Save configuration here
}
void lstFolderDossier_SelectedValueChanged(object sender, EventArgs e) {
PageChanged = true;
this.OnStatusChange();
}
private void lstFolderClients_SelectedIndexChanged(object sender, EventArgs e) {
PageChanged = true;
this.OnStatusChange();
}
This works well the first time I open the option page but if I close and reopen the page, the Dirty event is not raised anymore and it's impossible to enable the Apply button and the Apply event is never raised.
|
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Eddy.
Thank you for the bug report. I will fix it in the next build.
However you can avoid this issue using the 'this.clientSite = null;' statement. Just add it before the OnStatusChange method.
E.g.
void lstFolderDossier_SelectedValueChanged(object sender, EventArgs e) {
PageChanged = true;
this.clientSite = null;
this.OnStatusChange();
}
|
|
Eddy MINET
Posts: 4
Joined: 2006-09-26
|
Thank you very much. It works well now ! |
|