Example #1
0
        public static IModelList <IModelColumn> Get_CascadeColumnFilters(IModelLookupCascadePropertyEditor modelLookupPropertyEditor)
        {
            var cascadeMemberViewItem = modelLookupPropertyEditor.CascadeMemberViewItem;

            return(new CalculatedModelNodeList <IModelColumn>(cascadeMemberViewItem != null
                ? cascadeMemberViewItem.GetLookupListView().VisibleMemberViewItems().Cast <IModelColumn>()
                                                              .Where(_ => _.ModelMember.Type == modelLookupPropertyEditor.GetParent <IModelMemberViewItem>().ModelMember.MemberInfo.Owner.KeyMember.MemberType)
                : Enumerable.Empty <IModelColumn>()));
        }
Example #2
0
        public static IModelList <IModelMemberViewItem> Get_LookupPropertyEditorMemberViewItems(IModelLookupCascadePropertyEditor modelLookupPropertyEditor)
        {
            var modelMemberViewItems = modelLookupPropertyEditor.GetParent <IModelObjectView>().MemberViewItems()
                                       .Where(item => item != modelLookupPropertyEditor.Parent && typeof(ASPxLookupCascadePropertyEditor).IsAssignableFrom(item.PropertyEditorType));

            return(new CalculatedModelNodeList <IModelMemberViewItem>(modelMemberViewItems));
        }