Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookupeditor criteria #9

Closed
demonicmetalcs opened this issue Sep 29, 2015 · 2 comments
Closed

Lookupeditor criteria #9

demonicmetalcs opened this issue Sep 29, 2015 · 2 comments

Comments

@demonicmetalcs
Copy link

If you have a lookup editor and it is connected to a view that has criteria and the mode is not search. The criteria is not applied.

So in the class XafBootstrapLookupPropertyEditor I have replaced the following code
in my test this works fine I have NOT added this to the code on Github, that is something for you to do.

Old Code :
if (!IsSelector)
{
cs = Helper.CreateCollectionSource(Helper.ObjectSpace.GetObject(CurrentObject));
if (Helper.EditorMode == LookupEditorMode.Auto || Helper.EditorMode == LookupEditorMode.AllItemsWithSearch)
IsSelector = cs != null && cs.List.Count > 20;
}

New code:

if (!IsSelector)
{
cs = Helper.CreateCollectionSource(Helper.ObjectSpace.GetObject(CurrentObject));
if (cs != null && Model.View is IModelListView && !string.IsNullOrEmpty(((IModelListView)Model.View).Criteria))
cs.Criteria.Add("ViewCriteria",CriteriaOperator.Parse(((IModelListView)Model.View).Criteria));
if (Helper.EditorMode == LookupEditorMode.Auto || Helper.EditorMode == LookupEditorMode.AllItemsWithSearch)
IsSelector = cs != null && cs.List != null && cs.List.Count > 20 ;
}

@Terricks
Copy link
Owner

Thank you, we examine your code and make changes.

Terricks pushed a commit that referenced this issue Jul 27, 2016
Fixed issues: #9, #10 (implemented focus logic), #18, #19, #15, #21

New features:
- New kind of menu
- Support for awesome-icons set
- Improve stability and functionality
- Support for DevExpress 15.2 lib.

Known issues:
- With new style DevExpress included jQuery by default. So, in
XAFBootstrap it has been disabled. But if you use old templates - you
need to include it (put off commented rows in XAFBootstrap with jQuery).
Or you can enable html5 support in web.config of your web project -
devExpress/settings section (it has to be doctypeMode="Html5")
@Terricks
Copy link
Owner

Enhanced in release 15.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants