Search This Blog


Monday, June 6, 2016

How to access derived (inherited) objects from OData Service

I want to quote a new KB article we created to more easily answer such user questions, especially due to the increased interest in OData in light of the recent arrival of the XAF mobile UI (CTP)

"I created an XPO OData service (XpoDataServiceV3) based on my model, but when I try to query a collection of objects that are derived from another persistent object, the result set includes all objects inherited from the base class. Is it a bug? How can I get only derived objects?"

"This behavior is caused by limited support for derived objects in the OData protocol, which doesn't expose derived classes as entity sets. To access derived objects or their properties, you have to include a type cast using the qualified object type name in the path constructed for a base class. For example, if you wish to get Person objects that are inherited from Party, use the following query:


Please refer to Derived Entity Type section of the OData Advanced Tutorial and Addressing Derived Types section of the OData protocol documentation for more examples.

Note that this specificity is not related to XPO. If you create a WCF Data Service based on an Entity Framework model, it will behave in a similar manner in regard to derived entities."

And here is a real-life URL query I tested with the data service I created with our MainDemo app and the new Mobile project template:


Again, take special note that this is however, NOT specific to XAF itself or DevExpress ORM OData Service in any way, but rather to the OData V3 protocol itself.

Wednesday, June 1, 2016

How to: Use DevExtreme Widgets in an XAF Application (New KB Article and Example)

I wanted to advertise the new XAF learning materials we have just published for the v15.2.10 version we released today:

T381904: How to display the dxChart widget in an XAF  view (KB Article)
T380965: How to: Use DevExtreme Widgets in an XAF Application (Code Example)

We have been using a similar approach in our Web ReportsV2 and Maps modules, and I hope you find this documentation helpful as well.

As always, my team and I look forward to hearing your thoughts on each of these improvements in comments to this blog or via the service.

Tuesday, May 24, 2016

WinForms GridListEditor - How to restore values in the auto filter row

I wanted to inform you of a recent solution update for this task, which will help you restore auto filter row values for reference properties as well (previously, there might be an exception). The main change is in wrapping the GridView.GuessAutoFilterRowValuesFromFilter call into the using(var criteriaScope = View.ObjectSpace.CreateParseCriteriaScope()) {...} construction, which relies on the smart DevExpress.Data.Filtering > CriteriaOperator > UserValueParse event  handling inside our XPO/EF core libraries

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() {
            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()) {//!!!

After you modify the filter either by manually typing values in the topmost grid row or visually via the filter builder and reopen the form, there will be the following result in the UI:

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! 

Friday, May 13, 2016

Usability improvements to the Object Model dialog in WinForms UI

This dialog is typically invoked from the Column Chooser in ListView or the layout customization form in DetailView.

Starting with v15.2.10, we have added the OK button, renamed the Close button to Cancel, and enabled multi-selection in the tree list within the Object Model dialog.

The Add button adds columns but does not close the dialog. You can also double-click an item to add it.
The OK button applies changes and closes the dialog. 
The Cancel button closes the dialog and does not apply changes. 

I hope your end-users find this minor thing useful.

Monday, May 2, 2016

Experimental support of DataView mode in Analysis editors of the PivotChart module in v15.2.10 - YOUR FEEDBACK IS NEEDED

Starting with v15.2.10 the DevExpress.ExpressApp.PivotChart.PivotChartModuleBase and 
DevExpress.ExpressApp.PivotChart.AnalysisEditorBase classes provide the new
 DataAccessMode property. The supported values are  Client (default) and DataView (new).Use the first class via the Application Designer to configure the required data access mode globally for all analysis editors in the application while the second class can be used in a ViewController to configure individual editors (learn more...).
Refer to the eXpressApp Framework > Concepts > UI Construction > Views > List View Data Access Mode  documentation to learn more on the specificities of each data access mode, because the validity of the PivotGridSettingsContent property is up to the XAF developer. For instance, in DataView mode non-persistent properties are not processed.

To test the preview version of this functionality right away in v15.2, almost one month prior to the official release, do the following: