using System;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Model;
namespace XafExtendTest.Module
{
public partial class SwitchMasterDetailViewController : ViewController
{
public SwitchMasterDetailViewController()
{
InitializeComponent();
RegisterActions(components);
}
private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
{
if (((IModelListView)View.Model).MasterDetailMode == MasterDetailMode.ListViewAndDetailView)
((IModelListView)View.Model).MasterDetailMode =
DevExpress.ExpressApp.MasterDetailMode.ListViewOnly;
else
((IModelListView)View.Model).MasterDetailMode =
DevExpress.ExpressApp.MasterDetailMode.ListViewAndDetailView;
View.SetInfo(View.Model);
}
}
}
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Model;
namespace XafExtendTest.Module
{
public partial class SwitchMasterDetailViewController : ViewController
{
public SwitchMasterDetailViewController()
{
InitializeComponent();
RegisterActions(components);
}
private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
{
if (((IModelListView)View.Model).MasterDetailMode == MasterDetailMode.ListViewAndDetailView)
((IModelListView)View.Model).MasterDetailMode =
DevExpress.ExpressApp.MasterDetailMode.ListViewOnly;
else
((IModelListView)View.Model).MasterDetailMode =
DevExpress.ExpressApp.MasterDetailMode.ListViewAndDetailView;
View.SetInfo(View.Model);
}
}
}
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/