本文整理汇总了C#中IModelListView类的典型用法代码示例。如果您正苦于以下问题:C# IModelListView类的具体用法?C# IModelListView怎么用?C# IModelListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IModelListView类属于命名空间,在下文中一共展示了IModelListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: XafBootstrapTableEditor
public XafBootstrapTableEditor(IModelListView info)
: base(info)
{
ListView = info;
MarkedObjects = new List<String>();
SelectedObjects = new List<Object>();
}
示例2: MasterDetailRuleInfo
public MasterDetailRuleInfo(IModelListView childListView, IModelMember collectionMember, ITypeInfo typeInfo, CriteriaOperator criteria, bool synchronizeActions) {
ChildListView = childListView;
CollectionMember = collectionMember;
TypeInfo = typeInfo;
_criteria = criteria;
_synchronizeActions = synchronizeActions;
}
示例3: ModifyInstanceGridView
public void ModifyInstanceGridView(XpandXafGridView masterGridView, int rowHandle, int relationIndex, IModelListView masterModelListView, List<IMasterDetailRule> masterDetailRules) {
var modelDetailRelationCalculator = new ModelDetailRelationCalculator(masterModelListView, masterGridView, masterDetailRules);
bool isRelationSet = modelDetailRelationCalculator.IsRelationSet(rowHandle, relationIndex);
if (isRelationSet) {
IModelListView childModelListView = modelDetailRelationCalculator.GetChildModelListView(rowHandle, relationIndex);
Window window = _xafApplication.CreateWindow(TemplateContext.View, null, true, false);
ListView listView = GetListView(modelDetailRelationCalculator, rowHandle, relationIndex, childModelListView);
var detailXafGridView = (XpandXafGridView)masterGridView.GetDetailView(rowHandle, relationIndex);
((XpandGridListEditor)listView.Editor).CustomGridViewCreate +=
(o, eventArgs) => {
eventArgs.Handled = true;
eventArgs.GridView = detailXafGridView;
eventArgs.GridControl.DataSource = detailXafGridView.DataSource;
};
EventHandler[] listViewOnControlsCreated = { null };
listViewOnControlsCreated[0] = (sender, args) => {
detailXafGridView.MasterFrame = masterGridView.MasterFrame ?? _masterFrame;
detailXafGridView.Window = window;
detailXafGridView.GridControl = masterGridView.GridControl;
listView.ControlsCreated -= listViewOnControlsCreated[0];
};
listView.ControlsCreated += listViewOnControlsCreated[0];
((PropertyCollectionSource)listView.CollectionSource).MasterObject = masterGridView.GetRow(rowHandle);
window.SetView(listView);
}
}
示例4: XpandASPxGridListEditorSynchronizer
public XpandASPxGridListEditorSynchronizer(DevExpress.ExpressApp.Web.Editors.ASPx.ASPxGridListEditor gridListEditor, IModelListView model) : base(gridListEditor, model) {
modelSynchronizerList = new ModelSynchronizerList();
modelSynchronizerList.Add(new GridViewOptionsModelSynchronizer(gridListEditor.Grid, model));
foreach (var column in model.Columns) {
modelSynchronizerList.Add(new ColumnOptionsModelSynchronizer(gridListEditor.Grid, column));
}
}
示例5: GridListEditorSynchronizer
public GridListEditorSynchronizer(GridListEditor gridListEditor, IModelListView model)
: base(gridListEditor, model) {
modelSynchronizerList = new ModelSynchronizerList { new GridViewOptionsModelSynchronizer(gridListEditor.GridView, model) };
foreach (var modelColumn in model.Columns) {
modelSynchronizerList.Add(new ColumnOptionsModelSynchronizer(gridListEditor.GridView, modelColumn));
}
}
示例6: XpandTreeListEditorModelSynchronizerList
public XpandTreeListEditorModelSynchronizerList(TreeListEditor treeListEditor, IModelListView model)
: base(treeListEditor, model) {
modelSynchronizerList = new ModelSynchronizerList();
modelSynchronizerList.Add(new TreeListOptionsModelSynchronizer(treeListEditor.TreeList, model));
foreach (var modelColumn in model.Columns) {
modelSynchronizerList.Add(new TreeListColumnOptionsModelSynchronizer(treeListEditor.TreeList, modelColumn));
}
}
示例7: GetLevelDefaultViewCore
DevExpress.XtraGrid.Views.Base.ColumnView GetLevelDefaultViewCore(IModelListView masterModelListView, IMasterDetailColumnView masterGridView, int rowHandle, int relationIndex, List<MasterDetailRuleInfo> masterDetailRules) {
var modelDetailRelationCalculator = new ModelDetailRelationCalculator(masterModelListView, masterGridView, masterDetailRules);
bool isRelationSet = modelDetailRelationCalculator.IsRelationSet(rowHandle, relationIndex);
if (isRelationSet) {
IModelListView childModelListView = modelDetailRelationCalculator.GetChildModelListView(rowHandle, relationIndex);
ListView listView = GetListView(modelDetailRelationCalculator, rowHandle, relationIndex, childModelListView);
listView.CreateControls();
return ((IColumnViewEditor)listView.Editor).ColumnView;
}
return null;
}
示例8: SetFooterCount
protected void SetFooterCount(IModelListView view)
{
view.IsFooterVisible = true;
var firstColumn = view.Columns.Where(x => x.Index > -1).OrderBy(x => x.Index).FirstOrDefault();
var sum = firstColumn?.Summary.FirstOrDefault(x => x.SummaryType == SummaryType.Count);
if (firstColumn != null && sum == null)
{
sum = firstColumn.Summary.AddNode<IModelColumnSummaryItem>(firstColumn.PropertyName+"Count");
sum.SummaryType = SummaryType.Count;
}
}
示例9: GetLevelDefaultViewCore
XpandXafGridView GetLevelDefaultViewCore(IModelListView masterModelListView, XpandXafGridView masterGridView, int rowHandle, int relationIndex, List<IMasterDetailRule> masterDetailRules) {
var modelDetailRelationCalculator = new ModelDetailRelationCalculator(masterModelListView, masterGridView, masterDetailRules);
bool isRelationSet = modelDetailRelationCalculator.IsRelationSet(rowHandle, relationIndex);
if (isRelationSet) {
IModelListView childModelListView = modelDetailRelationCalculator.GetChildModelListView(rowHandle, relationIndex);
ListView listView = GetListView(modelDetailRelationCalculator, rowHandle, relationIndex, childModelListView);
XpandXafGridView defaultXpandXafGridView = null;
EventHandler[] listViewOnControlsCreated = { null };
listViewOnControlsCreated[0] = (sender, args) => {
defaultXpandXafGridView = (XpandXafGridView)((GridListEditor)((XpandListView)sender).Editor).GridView;
listView.ControlsCreated -= listViewOnControlsCreated[0];
};
listView.ControlsCreated += listViewOnControlsCreated[0];
listView.CreateControls();
return defaultXpandXafGridView;
}
return null;
}
示例10: GetLevelDefaultViewCore
DevExpress.XtraGrid.Views.Base.ColumnView GetLevelDefaultViewCore(IModelListView masterModelListView, ExpressApp.MasterDetail.Win.IMasterDetailColumnView masterGridView, int rowHandle, int relationIndex, List<MasterDetailRuleInfo> masterDetailRules) {
var modelDetailRelationCalculator = new ModelDetailRelationCalculator(masterModelListView, masterGridView, masterDetailRules);
bool isRelationSet = modelDetailRelationCalculator.IsRelationSet(rowHandle, relationIndex);
if (isRelationSet) {
IModelListView childModelListView = modelDetailRelationCalculator.GetChildModelListView(rowHandle, relationIndex);
ListView listView = GetListView(modelDetailRelationCalculator, rowHandle, relationIndex, childModelListView);
DevExpress.XtraGrid.Views.Base.ColumnView defaultXpandXafGridView = null;
EventHandler[] listViewOnControlsCreated = { null };
ListView view = listView;
listViewOnControlsCreated[0] = (sender, args) => {
defaultXpandXafGridView = ((IColumnViewEditor)((ListView)sender).Editor).GridView;
view.ControlsCreated -= listViewOnControlsCreated[0];
};
listView.ControlsCreated += listViewOnControlsCreated[0];
listView.CreateControls();
return defaultXpandXafGridView;
}
return null;
}
示例11: Create
public static CollectionSourceBase Create(XafApplication application, IObjectSpace objectSpace, IModelListView listViewNode) {
IModelCustomDataSource modelCustomDataSource = ((IModelListViewExtension)listViewNode).CollectionDataSource;
if (modelCustomDataSource == null) return null;
Type customDataSourceType = modelCustomDataSource.CustomDataSourceType; // Тип коллекции
if (customDataSourceType == null) return null;
// Две строки ниже стали не нужны, т.к. тип вычисляется из запроса ниже: query.ElementType
// В модели поле тоже как бы не нужно - пусть останется зарезервированным пока что.
//Type objectType = modelCustomDataSource.ObjectType; // Тип выхода запроса
//if (objectType == null) return null;
// Создание объекта запроса
IQueryable query = Activator.CreateInstance(customDataSourceType, ((ObjectSpace)objectSpace).Session) as IQueryable; // as IQueryable;
// Создание коллекции с типом customDataSourceType
//var outCollection = Activator.CreateInstance(customDataSourceType, objectSpace);
LinqCollectionSource outCollection = new LinqCollectionSource(objectSpace, query);
return outCollection ;
}
示例12: AdvBandedListEditor
public AdvBandedListEditor(IModelListView model)
: base(model) {
}
示例13: GridViewOptionsModelSynchronizer
public GridViewOptionsModelSynchronizer(object control, IModelListView model) : base(control, model) {
}
示例14: CreateListView
public ListView CreateListView(IModelListView childModelListView, int rowHandle, int relationIndex, XafApplication application) {
IModelMember relationModelMember = _modelDetailRelationCalculator.GetRelationModelMember(rowHandle, relationIndex);
return CreateListView(childModelListView, relationModelMember, application);
}
示例15: GetListView
ListView GetListView(ModelDetailRelationCalculator modelDetailRelationCalculator, int rowHandle, int relationIndex, IModelListView childModelListView) {
var listViewBuilder = new ListViewBuilder(modelDetailRelationCalculator, _objectSpace);
return listViewBuilder.CreateListView(childModelListView, rowHandle, relationIndex);
}