Willem de Vries
12.28.2011
Hello Willem,
You can use the following controller to solve this problem (add this code to the base module project):
[C#]using System; using System.Collections.Generic; using System.Linq; using System.Text; using DevExpress.ExpressApp; using DevExpress.ExpressApp.SystemModule; using DevExpress.ExpressApp.Editors; using DevExpress.ExpressApp.Actions; namespace XXX.Module { public class PropagateRefreshActionController : ViewController<DashboardView> { private void RefreshAction_ExecuteCompleted(object sender, DevExpress.ExpressApp.Actions.ActionBaseEventArgs e) { foreach(DashboardViewItem dashboardViewItem in View.GetItems<DashboardViewItem>()) { RefreshController refreshController = dashboardViewItem.Frame.GetController<RefreshController>(); if(refreshController != null) { SimpleAction refreshAction = refreshController.RefreshAction; if(refreshAction != null && refreshAction.Enabled && refreshAction.Active) { refreshAction.DoExecute(); } } } } protected override void OnActivated() { base.OnActivated(); RefreshController refreshController = Frame.GetController<RefreshController>(); if(refreshController != null && refreshController.RefreshAction != null) { refreshController.RefreshAction.ExecuteCompleted += new EventHandler<DevExpress.ExpressApp.Actions.ActionBaseEventArgs>(RefreshAction_ExecuteCompleted); } } protected override void OnDeactivated() { RefreshController refreshController = Frame.GetController<RefreshController>(); if(refreshController != null && refreshController.RefreshAction != null) { refreshController.RefreshAction.ExecuteCompleted -= new EventHandler<DevExpress.ExpressApp.Actions.ActionBaseEventArgs>(RefreshAction_ExecuteCompleted); } base.OnDeactivated(); } } }
Feel free to contact us in case of any further difficulty.
Thanks,
Leon
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+