[原] XAF自動綁定分析數據功能

 功能簡單直接上代碼:

 public partial class ListViewAnalyzViewController : ViewController
    {
        public ListViewAnalyzViewController()
        {
            InitializeComponent();
            RegisterActions(components);
            TargetViewId = "Analysis_DetailView";
        }

        protected override void OnActivated()
        {
            base.OnActivated();
            View.ControlsCreated += new EventHandler(View_ControlsCreated);
        }

        void View_ControlsCreated(object sender, EventArgs e)
        {
            Analysis currentAnalysis = (Analysis)View.CurrentObject;
            if (currentAnalysis.DataType != null)
            {
                Frame.GetController<DevExpress.ExpressApp.PivotChart.AnalysisDataBindController>().BindDataAction.DoExecute();
            }
        }
    }

你可能感兴趣的:([原] XAF自動綁定分析數據功能)