If you are interested in having something like this, check out this Support Center thread for a relatively simple Controller.
Search This Blog
Tuesday, May 23, 2017
Web - How to preserve the FullTextSearch Action filter after opening details for a record and returning back to ListView
If you are interested in having something like this, check out this Support Center thread for a relatively simple Controller.
Wednesday, March 29, 2017
Improving UX with Grid List Editors by disabling ALL unsupported operations for non-persistent columns in server modes (XAF v16.2.6) - YOUR FEEDBACK IS NEEDED!
YourPersistentAliasReferenceProperty.SomeNestedProperty1.SomeNestedPropertyN.
Such properties will be treated as regular non-persistent properties for now or you can disable our improvement using the feature toggle below.
For EF, calculated properties defined using CalculatedAttribute are still unsupported and treated as regular non-persistent properties mentioned above.
I do not need this behavior. How do I disable it?
With v16.2.7 (or, after installing this hot fix), you can set the PreventServerSideOperationsForNonPersistentMembers property of the DevExpress.ExpressApp.Editors > ColumnsListEditor class to False in the overridden OnActivated method of a custom ViewController for a required ListView. Refer to the following example:
[C#]using DevExpress.ExpressApp; using DevExpress.ExpressApp.Editors; namespace MainDemo.Module.Controllers { public class S31714_FeatureToggle : ViewController<ListView> { protected override void OnActivated() { base.OnActivated(); ColumnsListEditor columnsListEditor = View.Editor as ColumnsListEditor; if(columnsListEditor != null) { columnsListEditor.PreventServerSideOperationsForNonPersistentMembers = false; } } } }
[VB.NET]Imports DevExpress.ExpressApp Imports DevExpress.ExpressApp.Editors Namespace MainDemo.Module.Controllers Public Class S31714_FeatureToggle Inherits ViewController(Of ListView) Protected Overrides Sub OnActivated() MyBase.OnActivated() Dim columnsListEditor As ColumnsListEditor = TryCast(View.Editor, ColumnsListEditor) If columnsListEditor IsNot Nothing Then columnsListEditor.PreventServerSideOperationsForNonPersistentMembers = False End If End Sub End Class End Namespace
Tuesday, March 28, 2017
Filtering - How to search objects within ListPropertyEditor or enabling the standard FullTextSearch Action for nested ListView
Tuesday, May 24, 2016
WinForms GridListEditor - How to restore values in the auto filter row
using System;
using DevExpress.XtraGrid;
using DevExpress.ExpressApp;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.ExpressApp.Win.Editors;
namespace MainDemo.Module.Win {
public class B152594 : ViewController<ListView> {
GridListEditor gridlistEditor = null;
protected override void OnViewControlsCreated() {
base.OnViewControlsCreated();
gridlistEditor = View.Editor as GridListEditor;
if(gridlistEditor != null) {
gridlistEditor.Grid.HandleCreated += Grid_HandleCreated;
}
}
private void Grid_HandleCreated(object sender, EventArgs args) {
GridControl grid = (GridControl)sender;
grid.HandleCreated -= Grid_HandleCreated;
using(var criteriaScope = View.ObjectSpace.CreateParseCriteriaScope()) {//!!!
((GridView)grid.MainView).GuessAutoFilterRowValuesFromFilter();
}
}
}
}
I think your end-users will appreciate this functionality and I would be grateful to hear from you on how this works in your apps and whether there are any uncovered scenarios. Thanks!
Monday, December 14, 2015
How to hide or filter out certain types from the drop-down editor for the System.Type properties
Thursday, June 11, 2015
Implementing cascading lookup editors with the @This parameter
[DataSourceCriteria("Product.Oid = '@This.Product.Oid'")] public Accessory Accessory { ... }
Wednesday, March 4, 2015
JFYI for creators of custom PropertyEditors for complex ListView in-place editing scenarios in WinForms
Wednesday, July 30, 2014
Checking if an object is new or not within a criterion string
Typical usage scenarios
I remember registering a corresponding feature request in order to make it easier for XAF developers to accomplish the following types of tasks:a) Validating data fields for new records only; e.g., the scenario from Q440548
b) Implementing different data field appearance for new and saved records; e.g., the color or enabled state as in Q475272
c) Managing Action controls' state for new records via TargetObjectsCriteria
During these years these three scenarios stayed popular among our users (we had several dozens of trackers), so it was a natural decision for us, as framework creators, to make accomplishing this common and proven stuff easier for developers and probably end users.
Thursday, October 25, 2012
Meet the new DataSourceCriteriaProperty attribute - another addition to the unlimited XAF filtering capabilities
Another example where you asked, and we have listened and implemented.
"We have implemented a new DataSourceCriteriaPropertyAttribute attribute in 12.2. You can apply it to collection and reference properties (of course, you can also set it for the class member, ListView column or DetailView item in the application model) to filter them, similar to other standard DataSourceProperty and DataSourceCriteria attributes that work in this scenario.
The only difference is that the constructor of this attribute accepts a string name of the property of the CriteriaOperator type. This capability allows you to *dynamically* perform custom filtering of almost any complexity, and that works in the server mode (which is not always possible when DataSourcePropertyAttribute is used)."
You can find more information about the concrete business scenarios where this new attribute can be used in the ticket above. Hope you liked this small addition to the framework.