Quantcast
Channel: Developer Express Global
Viewing all 3389 articles
Browse latest View live

Blog Post: XAF - Using XAF's Security System in a DevExtreme App (with ASP.NET Web API/OData v4 powered by XPO)

$
0
0

This is part 2 of a series of posts designed to explain XAF’s security system and how it can be used in non-XAF .NET apps powered by XPO. If you are new to XAF’s security system or to this blog series, please review some of the reasons we think you should consider XAF’s security system in your next .NET application.  

Our new exampleconsists of an ASP.NET Core Web API/OData v4 service on the server and the DevExtreme Data Grid UI on the client. The app starts with a login form and then displays a data grid with “protected” records for the logged user.

Future Plans

In our next blog post, we’ll create a WinForms example with simple, form-based authentication logic (login/password). This was the most requested configuration based on our most recent survey and past blog comments. In addition to generic descriptions, our examples will also include step-by-step tutorials. Based on user feedback, we may extend the demo with full CRUD operations.
We look forward to your feedback on this sample and your thoughts on XAF’s security system. Feel free to share your usage scenarios below and we’ll be happy to extend the demo where appropriate.

Blog Post: ASP.NET Core Reporting – Store Reports within a Database Using Azure Cosmos DB

$
0
0

In this post, we’ll describe how to store your ASP.NET Core reports using Azure Cosmos DB and describe how to manage user roles.

Prerequisites – What You’ll Need

Implementation Details

To get started, create a sample project with our ASP.NET Core Reporting Project Template and then declare a new code unit - CosmosReportStorageWebExtension.cs. To implement a custom report storage, we need to inherit our class from the DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension and override all its public methods. You can find a description of these methods in our Custom Report Storage Implementation help topic.

Note: in the non-Windows environment, you can use the approach demonstrated in the ASP.NET Core Reporting - CLI Templates post to create a sample project.

Azure Cosmos DB Storage Access

Accessing an Azure Cosmos DB database requires the following information:

  • DatabaseID
  • ContainerID
  • Connection

The Azure Cosmos DB offers a wide range of API interfaces. In this post we’ll store reports in MongoDB using specifically designed API’s.

1) Follow Microsoft’s Create an Azure Cosmos account tutorial and create an instance of the following API: Azure Cosmos DB for MongoDB API.

2) Select the Quick Start tab to obtain your connection string:

MongoDB - Quick Start Tab

3) Return to the application and open the appSettings.json file and declare the CosmosSettings section as follows:

"CosmosSettings": {
    "DatabaseId": "TestDb",
    "ContainerId": "Reports",
    "SqlConnection": "<sql connection>",
    "MongoConnection": "<mongo connection>"
  }

We’ll use these details to instantiate the MongoClient class at runtime and connect to the database. In this example we’ll create a unified reusable interface should you wish to use a different API to access Azure Cosmos DB (instead of MongoDB).

4) Declare the following interface (implements basic read and update operations required by the report storage):

public interface ICosmosApiStorage { 
    Task UpdateReportItem(ReportItem reportItem); 
    Task<string> CreateReportItem(ReportItem reportItem); 
    Task<ReportItem> GetReportItem(string id); 
    Task<Dictionary<string, string>> GetReports(); 
}

Where the ReportItem class stores the report ID and its layout:

public class ReportItem {
    public byte[] ReportLayout { get; set; }
    [JsonProperty(PropertyName = "id")]
    public string Id { get; set; }
}

5) Declare the following class (designed specifically for the MongoDB API):

public class ReportItemMongo {
    public static ReportItemMongo CreateFromReportItem(ReportItem item) {
        return new ReportItemMongo() {
            ReportLayout = item.ReportLayout,
            ReportName = item.Id
        };
    }
    [JsonProperty(PropertyName = "_id")]
    public BsonObjectId id { get; set; }
    [JsonProperty(PropertyName = "ReportLayout")]
    public byte[] ReportLayout { get; set; }
    [JsonProperty(PropertyName = "reportName")]
    public string ReportName { get; set; }
    }

This class differs from the ReportItem class by the id property. This BsonObjectId property type is required for incremental indexing of MongoDB database records.

6) Use the MongoClient class methods to implement database access:

public class CosmosMongoApiStorage : ICosmosApiStorage {
    readonly MongoClient mongoClient;
    string databaseId;
    string containerId;
    IMongoCollection<ReportItemMongo> mongoCollection {
        get {
            return mongoClient.GetDatabase(databaseId).GetCollection<ReportItemMongo>(containerId);
        }
    }

    public static void Register(IServiceCollection serviceProvider, IConfiguration cosmosConfig) {
        var storage = new CosmosMongoApiStorage(cosmosConfig["MongoConnection"], cosmosConfig["DatabaseId"], cosmosConfig["ContainerId"]);
        serviceProvider.AddSingleton<ICosmosApiStorage>(storage);

    }

    public CosmosMongoApiStorage(string connection, string databaseId, string containerId) {
        this.databaseId = databaseId;
        this.containerId = containerId;
        MongoClientSettings settings = MongoClientSettings.FromUrl(new MongoUrl(connection));
        settings.SslSettings = new SslSettings() { EnabledSslProtocols = SslProtocols.Tls12 };
        mongoClient = new MongoClient(settings);
    }

    public async Task<ReportItem> GetReportItem(string id) {
        var item = (await mongoCollection.FindAsync(x => x.ReportName == id)).FirstOrDefault();
        return new ReportItem() {
            Id = item.ReportName,
            ReportLayout = item.ReportLayout
        };
    }

    public async Task UpdateReportItem(ReportItem reportItem) {
        UpdateDefinition<ReportItemMongo> updateDefinition = Builders<ReportItemMongo>.Update.Set(x => x.ReportLayout, reportItem.ReportLayout);
        await mongoCollection.UpdateOneAsync(x => x.ReportName == reportItem.Id, updateDefinition);
    }

    public async Task<string> CreateReportItem(ReportItem reportItem) {
        await mongoCollection.InsertOneAsync(ReportItemMongo.CreateFromReportItem(reportItem));
        return reportItem.Id;
    }

    public async Task<Dictionary<string, string>> GetReports() {
        return mongoCollection.AsQueryable().ToDictionary(x => x.ReportName, x => x.ReportName);
    }
}

Report Storage and Database Access

We need to connect our database access client implemented above with the report storage. Documentation recommends storing MongoClient instances in a global loication, either as a static variable or in an IoC container with a singleton lifetime.

1) Maintain our own data access class as a single instance in the Register method:

public static void Register(IServiceCollection serviceProvider, IConfiguration cosmosConfig) {
  ...
    serviceProvider.AddSingleton<ICosmosApiStorage>(storage);
  ...    
}

The CosmosMongoApiStorage.Register static method adds its own class instance to the global IServiceCollection collection of services. This allows you to access the CosmosMongoApiStorage class methods when implementing the report storage.

2) Modify the ReportStorageWebExtension class constructor and inject an instance of the ICosmosApiStorage interface:

readonly ICosmosApiStorage cosmosApiStorage; 

public CosmosReportStorageWebExtension(ICosmosApiStorage cosmosApiStorage) { 
    this.cosmosApiStorage = cosmosApiStorage; 
}

Report Storage and User Identification

We now need to take care of user identity in the report storage and filter reports that are available for two user roles: a report designer and report viewer.

In ASP.NET Core applications, the IHttpContextAccessor.HttpContext.User property value provides access to user identity. We’ll access this interface in our report storage.

1) Open the Startup.cs code unit and add the AddHttpContextAccessor method call to the ConfigureServices method:

public void ConfigureServices(IServiceCollection services) {
...
  services.AddHttpContextAccessor();
...
}

This action will add a default implementation for the IHttpContextAccessor service to the collection of services.

2) Inject this service into the constructor of the report storage:

readonly ICosmosApiStorage cosmosApiStorage;
readonly IHttpContextAccessor httpContextAccessor; 

public CosmosReportStorageWebExtension(ICosmosApiStorage cosmosApiStorage, IHttpContextAccessor httpContextAccessor) { 
  this.cosmosApiStorage = cosmosApiStorage; 
  this.httpContextAccessor = httpContextAccessor;
}

3) We need to register our custom implementation of the ReportStorageWebExtension class. We have two options:

Register it as a singleton:

public void ConfigureServices(IServiceCollection services) {
...
    services.AddSingleton<ReportStorageWebExtension, CosmosReportStorageWebExtension>();
...
} 

Register it as a scoped service. This is useful if you have implemented your own scoped services and need to access its data in the report storage:

public void ConfigureServices(IServiceCollection services) {
...
    services.AddScoped<ReportStorageWebExtension, CosmosReportStorageWebExtension>();
...
}

Notethe latter option is available in the next minor update of our DevExpress Reporting (v19.1.5).

4) The last step is to register our data access client and use Azure Cosmos DB settings stored in the configuration section:

public void ConfigureServices(IServiceCollection services) { 
... 
  CosmosMongoApiStorage.Register(services, Configuration.GetSection("CosmosSettings"));
...
}

Report Storage Methods - Implementation

The following code will restrict a user from creating, editing and storing a report within the database.

1) Declare the following method in the CosmosMongoApiStorage class to check user identity using the IHttpContextAccessor.HttpContext.User property:

bool IsAdmin()
{
    return httpContextAccessor.HttpContext.User.IsInRole("Admin"); ;
}

2) Use this method in the CanSetData / GetData method calls as follows:

public override bool CanSetData(string url)
{
   return isAdmin();
}

public override byte[] GetData(string url)
{
    if (!isAdmin()) throw new UnauthorizedAccessException();
    ...
}

A Sample Project Is Available

You can download the complete sample here.

The report storage implementation described herein supports both the SQL and MongoDB API. Use the CosmosClient class located in the Microsoft.Azure.Cosmos NuGet Package, if using the SQL API (for Azure Cosmos DB Storage access).

We used the Use cookie authentication without ASP.NET Core Identity tutorial to implement authentication for this sample project.

Future Plans - Your Feedback Counts

We ship a special DevExpress.Web.Reporting.Azure NuGet package that contains services designed to work with web reporting applications in the Microsoft Azure environment. We created these services to help you integrate our web reporting components in ASP.NET WebForms and MVC apps. The following method calls switch the Web Document Viewer and Web Report Designer components to store documents and their internal data within specifically designed Azure storage.

AzureWebDocumentViewerContainer.UseAzureEnvironment(cloudStorageConnectionString);
AzureReportDesignerContainer.UseAzureEnvironment(cloudStorageConnectionString);

You can learn more about our implementation in the following help topic: Microsoft Azure Reporting.

Note: This API is not yet available for the ASP.NET Core platform. Share your thoughts below and help us better serve your needs in both the short and long term.



Blog Post: XAF - Important Changes to the SPA UI Strategy: The Future is Blazor

$
0
0

The announcement within this post is important and I don't wish to minimize its impact. My goal is to give everyone as much advance notice as possible but I will save a more in-depth discussion for a later post.

As of last month, we officially canceled XAF's React-based SPA UI project. We have made the decision to focus our efforts on Blazor going forward.

We asked many XAF users for feedback and almost univerally, most felt that Blazor was indeed the right path forward. Since our ASP.NET team is also fully committed to the Blazor platform, we believe Blazor represents our best long-term option. Truth is that we seriously considered Blazor a year ago, but unfortunately it was not in the best possible state at that time.

We can no longer ignore the value Blazor brings to the table for our .NET user base. We appreciate all the wonderful React-related feedback you've given us over the last twelve months and though cancelling a project is not fun (nor does it help anyone's bottom line) we are confident that this decision will be a win/win for everyone.

Benefits of Blazor for You and DevExpress 

Though waiting another year for a Blazor UI is not the best news, our decision to pursue this new direction brings with it a number of benefits:

  • XAF v19.2 will include .NET Standard 2.0 Nuget packages. This helps the Security APIs in Non-XAF apps and allows us to address more usage scenarios for both XAF and non-XAF customers.
  • Blazor better fits the long term needs of our .NET users and those with little or no JavaScript, HTML and CSS experience. 
  • Blazor has fewer moving parts and a simpler architecture than our React SPA UI (DevExtreme React components are wrapped with a custom written UI scaffolding framework that works on top of XAF's server-side Application Model and View-based infrastructure).
  • Blazor provides simpler development flow - one that is familiar to WinForms and ASP.NET devs.
  • Our initial impression is that Blazor will allow us to add features more quickly and is easier to maintain. For instance, one developer can create a basic MainDemo-like app with list and detail forms in only 5 days with Blazor server-side. 
  • Blazor provides better performance than ASP.NET WebForms apps, because of its 'virtual DOM'-based UI updates (produces less traffic (bytes)). In our early tests, Blazor server-side spike performance is comparable to our SPA UI demos. Additionally, Blazor does not have issues with slow initial build (due to hundreds of megabytes in the node_modules folder). 

To Client-side, or Server-side, that is the Question.

As of this moment, our former SPA UI team is conducting final tests and we'll soon know whether to pursue Blazor client-side or Blazor server-side. Blazor client-side hosting mode supports offline and better scalability. Blazor server-side mode is much more mature, easier to use and much faster in our syntethic tests. Needless to say, we don't want customer apps (with hundreds of business classes and controllers) to load slowly with Mono inside the browser, especially on low power mobile devices.

The race continues and no obvious winner has emerged as of yet. I will announce who wins our Blazor client-side vs server-side shootout as soon as I am able. Please stay tuned.

Blog Post: Logify – How to Start Your Free Trial and Monitor App Crash Events with a Few Lines of Code

$
0
0
In this short blog post (it’s short because Logify services are easy to integrate into any .NET product delivery process), I’ll show you how to get started with Logify and test-drive our 24/7 app monitoring platform with just a few lines of code.

Step 1: Begin Your Trial and Create a New Application

If you have yet to try Logify, please follow the steps below to create your first Logify-enabled application. If you already have Logify account, you can skip this section and move to the next step.
  • Visit the Logify web page and press the Start Trial button.
  • Log onto Logify using your existing DevExpress account (or create a new account).
  • Go to the Applications page and create a new application. Once you create an app within Logify, you will receive an ApiKey.
In the next step, we’ll use this ApiKey to register the application with Logify.

Step 2: Add Logify to Your Application

Basic Logify setup is very simple. You need to install the Logify NuGet package and specify the ApiKey for the Logify client (to begin automatic exception handling). The following example is for a WinForms app, but adding Logify is just as easy for other supported platforms (WPF, VCL, ASP.NET, etc) :
  • Install the NuGet package. Call the following command in the NuGet Package Manager Console:
    Install-Package Logify.Alert.Win
  • Add the following lines of code before the Application.Run() method:
    LogifyAlert.Instance.ApiKey = "SPECIFY_YOUR_API_KEY_HERE";
    LogifyAlert.Instance.StartExceptionsHandling();

You are now ready to automatically track application exceptions. Execute your application and Logify will catch all unhandled exceptions within your app. You can review and process crash reports using Logify’s web interface: https://logify.devexpress.com/Alert/Reports

Note: Logify’s client installation and configuration differs slightly for each distinct app platform. Please review the following web page for specific setup instructions: Logify Basic Setup.

Blog Post: WinForms - Automatic Suggestions for Lookup Editors

$
0
0

A couple of years ago, we published a post about our rich collection of WinForms Lookup Editors. In this post, I’ll summarize the main differences between these controls and will explain how to select the appropriate WinForms Lookup for your next WinForms project.

Our upcoming release (v19.2) will include a fabulous new feature for our LookUpEdit and GridLookupEdit controls (automatic suggestions). Before I explain the benefits of this new feature, I want to draw a distinction between it and our existing auto-complete mode. Auto-complete can be enabled with the component’s SearchMode property. When active, auto-complete forces a bound lookup editor to locate records that match the text entered by a user and displays the first item it locates within the lookup:

autocomplete

To activate automatic suggestions (our new feature), you will need to set SearchMode to AutoSuggest. Unlike AutoComplete (which hides non-matching records within the data-bound lookup) AutoSuggest dynamically changes the editor’s data source as users enter text (as such, it can work with completely empty, unbound editors).

AutoSuggest will be available in our upcoming WinForms Early Access Preview build. We’ve created a new module in our XtraEditors demo to demonstrate this feature– stay tuned for detailed articles on usage scenarios. For now, let me quickly describe how it functions so you can decide whether it can address end-user requirements.

Each time a user enters a new character, the lookup editor fires the AutoSuggest event. This event must be handled and assigned a custom System.Threading.Tasks.Task object. This asynchronous cancelable Task must return a collection of records that will be treated as the editor’s source.

1
2
3
4
5
6
7
8
lookUpEdit1.AutoSuggest += OnAutoSuggest; 

voidOnAutoSuggest(objectsender, LookUpEditAutoSuggestEventArgse) {
// Set delay (if needed)
e.SetMinimumAnimationDuration(TimeSpan.FromMilliseconds(1000));
// Assign a Task that return suggestions
e.GetSuggestions = WorldCities.QueryAsync(e.Text, e.CancellationToken);
}

The way you implement Task is completely up to you: in the demo, we parse a huge locally stored Excel file. You can retrieve data from a database file or send SQL queries and retrieve records from a remote server.

autosuggest

When a lookup obtains drop-down items, the editor scans these records and highlights all portions of item captions that match user text. This default logic covers many simple scenarios, but if needed, you’re free to implement custom highlight patterns.

In the demo, our “Enter the city name” lookup is populated by a Task that searches for matches in city and state names. However, lookup records also contain country names. The default highlight pattern does not suit our scenario since it highlights characters within country names (which are ignored by the Task).

highlight

To fix this mismatch, the custom method is assigned to the SetHighlightRanges event parameter.

1
2
3
4
5
voidOnAutoSuggest(objectsender, LookUpEditAutoSuggestEventArgse) { 
//...
// Set Custom Highlight Strategy
e.SetHighlightRanges(HighlightTags(e.Text));
}

Tell Us What You Think!

As I mentioned earlier, we will discuss this feature in greater detail as we near our official release. If you are an active Universal or DXperience subscriber, please keep an eye out for our v19.2 Early Access Preview. Your feedback on this feature (and others planned for v19.2) will help us make our next release the best ever.

Blog Post: ASP.NET Core Office components - New Spreadsheet and Rich Text Editor controls (available in v19.1)

$
0
0

As you may already know, we delivered CTP versions of both our ASP.NET Core Rich Edit and Spreadsheet components at the end of 2018. We officially launched these two products in our v19.1 release cycle. This post details some of the newest features available in the DevExpress ASP.NET Core Spreadsheet and Rich Edit control.

ASP.NET Core Spreadsheet

DevExpress ASP.NET Core - Spreadsheet

Document Customization

DevExpress ASP.NET Core Spreadsheet includes the following built-in document customization capabilities:

  • Configure the height and width of workbook columns and rows.
  • Manage worksheets as necessary: insert, delete, copy, move, rename sheets, and the like.
  • Add objects, such as hyperlinks, tables, pictures, and charts onto a sheet.
  • Sort and filter table data.
  • Validate data.
  • Add comments to a document.
  • Setup document protection.

Sort and Filter Table Data

With our Spreadsheet you can manage tables just as you would in Microsoft Excel. A header cell drop-down menu provides advanced options (including the ability to filter and sort data). You can also define custom filter commands to address unique usage scenarios.

Flexible Chart Appearance Settings

A set of context-specific dialogs allows you to customize both chart and table appearance settings.

Ribbon

The ASP.NET Core Spreadsheet’s built-in ribbon displays the appropriate context tab when you select a table, chart, or a picture. The tabs contain specific commands for a selected object.

Another new feature is custom ribbon buttons that allows you to implement more complex usage scenarios. Try our Ribbon Customization demo to see this feature in action.

Context Menu

DevExpress ASP.NET Core Spreadsheet now provides a context menu with a rich client-side API. You can populate the menu with your custom items and control menu visibility within the PopupMenuShowing event.

Differences with WebForms/MVC Spreadsheet

The following list details differences between our ASP.NET Core Spreadsheet and its WebForms/MVC counterpart.

  1. Page settings can only be set via its server-side API.
  2. Cell format can only be customized via its server-side API.
  3. Pivot table support is not yet available.
  4. Open and Save buttons are not provided because our customers prefer to implement their own document open and save functionality.
  5. At this point, we only support the English culture. We plan to localize the component in a future release.

See the ASP.NET Core Spreadsheet online demos to learn more about the myriad of features that ship with this component library.

ASP.NET Core Rich Edit

DevExpress ASP.NET Core - RichEdit

Ribbon Customization

In addition to default items available within the built-in ribbon, you can create custom items with custom functionality as needed. The CustomCommandExecuted event allows you to respond to a custom button click. You can use a new icon or choose an icon from the DevExtreme icon library.

See our online demo for additional info.

Client-Side API

DevExpress Rich Edit provides a comprehensive client-side API to manage documents, customize document content and appearance, change selection, etc. Refer to RichEdit API documentation for more info.

Mail Merge and Document Variables

Our ASP.NET Core Rich Edit provides Mail Merge functionality to create personalized documents as necessary. You can create a document with merged data using the following three steps:

  1. Provide a data source.
  2. Create a document template with merge field fields.
  3. Merge and save the document.

An end-user can preview merge results to make certain it is correct. In addition to the UI, the ASP.NET Core Rich Edit control includes a mailMerge method to initiate mail merge from code.

The control now supports a DocVariable field that can be replaced with custom text. Handle the CalculateDocumentVariable event to provide the text result.

See our online demo for more information.

Printing

The ASP.NET Core Rich Edit component includes client-side WYSWYG print support. The control renders the current document’s markup into a blank browser tab and calls the browser's print dialog.

Document Import and Export

The Rich Edit control allows you to import and export files in both Open-XML (.docx) and Plain text (.txt) formats. We plan to support Rich Text Format (.rtf) later this year.

Differences with WebForms/MVC Rich Text Editor

The following list details differences between our ASP.NET Core Rich Edit and its WebForms/MVC counterpart.

  • RTF support is not yet available. This feature will ship later this year.
  • Document protection is not yet available.
  • PDF printing is not yet available.
  • DocVariables can only be replaced with plain text.
  • At this point, we only support the English culture. We plan to localize the component in a future release.

Should you have any questions regarding our ASP.NET Core Spreadsheet or our ASP.NET Core Rich Edit, feel free to comment below. We’d love to hear your feedback.

Blog Post: Blazor Components - Tips & Tricks

$
0
0

The official launch date for ASP.NET Core 3.0, and Blazor is approaching fast. Thanks to your great feedback, we've created a number of useful samples for common usage scenarios. Check out the following examples to learn more about DevExpress UI for Blazor.

How to edit a row on a separate page

This example shows how to edit a DevExpress Blazor Data Grid on a separate page. The grid contains a template column with an Edit hyperlink that opens the edit form in a separate page. The browser redirects the user back to the primary page when editing is complete.

How to edit/delete the selected row by clicking external buttons

Learn how to edit and delete a selected row in code.

How to show/hide columns based on the value from external UI elements

See how you can use an external UI element (a check box) to manage Blazor Data Grid column visibility.

How to change DxFormLayout's item and group visibility

In this example, we demonstrate how to conditionally display form fields in a Blazor Form Layout (based on user selection).

How to create cascading grids

Learn how to setup master-detail rows within our Blazor Data Grid component. A detail grid is automatically populated with filtered data when a user selects a row from the master grid.

Useful Resources

Take a look at our support knowledge base and GitHub Blazor repository for more Blazor examples.

We've created a guide to help you create a new project and use DevExpress UI for Blazor / Razor Components.

Test drive our online demos to experience our versatile Blazor components at your own pace.

Your Feedback Counts

Help us shape the direction of our Blazor product line. Please share your Blazor experiences with us and tell us how you expect to use Blazor now and into the future.

Blog Post: WinForms Lookup Editors - AutoSearch Mode

$
0
0

In the previous post, I announced our new AutoSuggest mode for both the DevExpress LookUpEdit and GridLookUpEdit controls. Briefly, AutoSuggest allows the editor to execute a custom Task to retrieve drop-down menu items (as such, the editor has a virtual data source that changes each time a user enters values within the lookup’s text box). We expect that most of you will use this new feature for empty, unbound editors. If your lookup editor is bound to a static data source, source records will be displayed in only one use case: when the text box is empty and a user presses the drop-down button.

A few weeks ago, this was the only use case we considered while developing AutoSuggest. Thanks to some great feedback, we decided to extend our implementation and to address another important usage scenario: filtering records in bound editors.

Until now, if you wanted users to search for lookup records, you were forced to use our SearchLookUpEdit. This editor addressed the business requirement, but it lacked some of the modern features today’s users have come to expect from advanced desktop apps. SearchLookUpEdit shipped with a ”locked” text box that did not allow users to enter text values via the keyboard. To locate records, it activated a drop-down panel and allowed users to enter search criteria within its embedded find panel.

With v19.2, you will be able to bind a LookUpEdit \ GridLookUpEdit editor to a data source, change the Properties.SearchMode to AutoSearch and voila: give users the ability to enter search values within the editor’s text box - matching records will be automatically displayed within the lookup’s drop-down menu.

Whenever we implement a new feature, we do everything possible to extend core functionality across multiple products. For instance, this new AutoSearch feature will accept the same syntax used by our Find Panel.

Just like AutoSuggest, AutoSearch fires its own event when users enters text values (the AutoSearch event). Though you do not need to handle the event (everything will work out-of-the-box), we’ve given you the ability to do so when needs arise. For example, you can use the e.SetParameters method in the event handler to fine-tune search results. This method accepts two parameters that are similar to ParserKind and Condition properties used by Find Panels displayed within our WinForms data-aware controls:

1
2
3
4
5
6
usingDevExpress.Data.Filtering;

privatevoidLookUpEdit1_AutoSearch(objectsender, LookUpEditAutoSearchEventArgse)
{
e.SetParameters(FindPanelParserKind.And, FilterCondition.StartsWith);
}

Since arguments for both AutoSuggest and AutoSearch events derive from the same base class, our custom highlight API applies. The example below illustrates how to highlight an entire data field value when it matches the value entered within the text box.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
privatevoidLookUpEdit1_AutoSearch(objectsender, LookUpEditAutoSearchEventArgse)
{
e.SetParameters(FindPanelParserKind.And, FilterCondition.StartsWith);
e.SetHighlightRanges(CustomHightlight(e.Text));
}

staticFunc<string, string, DisplayTextHighlightRange[]> CustomHightlight(stringuserText)
{
return (displayText, fieldName) =>
{
if (fieldName == "ShipCity" || fieldName == "ShipCountry")
{
if (displayText.StartsWith(userText))
returnnewDisplayTextHighlightRange[] {
newDisplayTextHighlightRange(0, displayText.Length) };
}
returnnull;
};
}

Your Feedback Matters

Though our SearchLookUpEdit will continue to be used for our server mode data sources (AutoSearch will not support server mode) - AutoSearch should address all remaining usage scenarios. Please let me know what you think of this new feature and how likely you are to use it in your next WinForms project.


Blog Post: ASP.NET Core File Manager - How to Display Files Hosted on Azure

$
0
0

If your web application stores files within a cloud service, you'll find that visualizing a file system can be both cumbersome and time-consuming. In this blog post, we’ll briefly explain Azure storage, what the main problems are, and show you how you can use our ASP.NET Core File Manager to display hierarchical file information in your next web app.

Azure Data Storage

The following diagram illustrates the main concepts of Azure's storage structure:

Azure Data Storage

Unlike a local file system, Azure stores files in blobs, stored in blob containers. A blob container can contain several blobs. By default, Azure provides the files in your containers as a plain list. If you want to display files and folders hierarchically, you should create a custom file storage based on Azure blob storage data. See Creating an Azure Blob Hierarchy.

Creating a Custom File System

To help get you started, we created a solution with a custom file system provider that organizes files into a hierarchical file system. Follow the steps below to include this solution in your application.

  1. Download the source code for our ASP.NET Core sample project.
  2. Add the project to your Visual Studio solution.
  3. Execute the following command in the Visual Studio NuGet Package Manager Console to install the Microsoft.Azure.Storage.Blob Nuget package:
    dotnet add package Microsoft.Azure.Storage.Blob --version 11.0.0
  4. To connect the DevExpress File Manager to Azure storage, create a custom file system provider that implements the IFileProvider interface (this is the AzureBlobFileProvider class in our sample).
  5. Use the Azure SDK to implement the necessary code to manage (rename, remove, copy, etc.) storage data.
  6. Specify an account name, container name and corresponding access key to access the appropriate container in your storage.
  7. Assign your custom file system provider to the FileSystemConfiguration.FileSystemProvider property and apply security permissions to files and folders:
public IActionResult FileSystem(FileSystemCommand command, string arguments)
{
	var config = new FileSystemConfiguration
    {
		Request = Request,
		FileSystemProvider = new AzureBlobFileProvider(),
		AllowCopy = true,
		AllowCreate = true,
		AllowMove = true,
		AllowRemove = true,
		AllowRename = true,
		AllowUpload = true,
		UploadTempPath = _hostingEnvironment.ContentRootPath + "/wwwroot/UploadTemp"
	};
    var processor = new FileSystemCommandProcessor(config);
   	var result = processor.Execute(command, arguments);
   	return Ok(result.GetClientCommandResult());
}
Note: You can use a similar approach to bind our ASP.NET Core File Manager to a different cloud service.

Survey

If you’re currently using the DevExpress ASP.NET File Manager control and expect to use Azure in an upcoming project, we’d love to hear from you. Please share your experiences with us below.

Blog Post: WinForms and WPF Spreadsheet – How to Create a Data Entry Form

$
0
0

Our WinForms and WPF Spreadsheet controls can help you create intuitive data editing user experiences within your next desktop application. Built-in features allow you to process spreadsheet documents as needed. You can load and export workbooks using different formats, create templates, apply password protection, retrieve data from various data sources, perform simple or complex calculations, embed custom data editors within individual cells, validate cell values, etc.

In this blog post, we will show you how to leverage the flexibility of our WinForms and WPF Spreadsheet controls to create a payroll data entry form. You could replicate similar functionality using standard controls, but the ubiquity of Microsoft Excel in the business world (users are familiar with both its UI and its core functionality) should help lower the overall learning curve of your next desktop app (the ultimate aim of this demo is to show you how to create spreadsheet powered data entry forms).

As you’ll discover, this sample allows users to enter payroll information within the Spreadsheet (regular and overtime hours worked, sick leave and vacation hours, overtime pay rate and deductions). Once data is entered, the Spreadsheet automatically calculates an employee’s pay and payroll taxes. The data navigator at the bottom of the application allows you to switch between employees.

Note: Though this example uses our WinForms Spreadsheet control, the same approach can be used for our WPF Spreadsheet.

How to Create a Payroll Calculator with a Data Entry Form

  1. Create a new application and add the Spreadsheet control and Data Navigator to your form.

  2. Create a Payroll Calculator document template and protect the workbook to prevent modifications. Users can only change values in the highlighted cells.

    Feel free to download the PayrollCalculatorTemplate.xslx file to proceed.

  3. Load the generated template into the WinForms Spreadsheet control.

    spreadsheetControl1.LoadDocument("PayrollCalculatorTemplate.xlsx");
  4. Assign our custom in-place editors (we chose to use spin editors) to the editable cells to facilitate user input.

    private void BindCustomEditors() {
        var sheet = spreadsheetControl1.ActiveWorksheet;
        sheet.CustomCellInplaceEditors.Add(sheet["D8"], CustomCellInplaceEditorType.Custom, 
                                           "RegularHoursWorked");
        sheet.CustomCellInplaceEditors.Add(sheet["D10"], CustomCellInplaceEditorType.Custom, 
                                           "VacationHours");
        sheet.CustomCellInplaceEditors.Add(sheet["D12"], CustomCellInplaceEditorType.Custom, 
                                           "SickHours");
        sheet.CustomCellInplaceEditors.Add(sheet["D14"], CustomCellInplaceEditorType.Custom, 
                                           "OvertimeHours");
        sheet.CustomCellInplaceEditors.Add(sheet["D16"], CustomCellInplaceEditorType.Custom, 
                                           "OvertimeRate");
        sheet.CustomCellInplaceEditors.Add(sheet["D22"], CustomCellInplaceEditorType.Custom, 
                                           "OtherDeduction");
    }
  5. Handle the SelectionChanged and CustomCellEdit events to display a spin editor when a user clicks on an editable cell.

    // Activate a cell editor when a user selects an editable cell.
    private void SpreadsheetControl1_SelectionChanged(object sender, EventArgs e) {
        var sheet = spreadsheetControl1.ActiveWorksheet;
        if (sheet != null) {
            var editors = 
                sheet.CustomCellInplaceEditors.GetCustomCellInplaceEditors(sheet.Selection);
            if (editors.Count == 1)
                spreadsheetControl1.OpenCellEditor(CellEditorMode.Edit);
        }
    }
    
    // Display a custom in-place editor for a cell.
    private void spreadsheetControl1_CustomCellEdit(object sender, 
                                                    SpreadsheetCustomCellEditEventArgs e) {
        if (e.ValueObject.IsText)
            e.RepositoryItem = CreateCustomEditor(e.ValueObject.TextValue);
    }
    
    private RepositoryItem CreateCustomEditor(string tag) {
        switch (tag) {
            case "RegularHoursWorked": return CreateSpinEdit(0, 184, 1);
            case "VacationHours": return CreateSpinEdit(0, 184, 1);
            case "SickHours": return CreateSpinEdit(0, 184, 1);
            case "OvertimeHours": return CreateSpinEdit(0, 100, 1);
            case "OvertimeRate": return CreateSpinEdit(0, 50, 1);
            case "OtherDeduction": return CreateSpinEdit(0, 100, 1);
            default: return null;
        }
    }
    
    private RepositoryItemSpinEdit CreateSpinEdit(int minValue, int maxValue, int increment) 
        => new RepositoryItemSpinEdit {
            AutoHeight = false,
            BorderStyle = BorderStyles.NoBorder,
            MinValue = minValue,
            MaxValue = maxValue,
            Increment = increment,
            IsFloatValue = false
        };

Create a Data Model

  1. Create the PayrollModel class. This entity class implements the INotifyPropertyChanged interface, and exposes basic properties for this project: EmployeeName, RegularHoursWorked, HourlyWage, etc.

    public class PayrollModel : INotifyPropertyChanged {
        private string employeeName;
        private double hourlyWage;
        
        // ...
    
        public string EmployeeName {
            get => employeeName;
            set {
                if (employeeName != value) {
                    employeeName = value;
                    NotifyPropertyChanged();
                }
            }
        }
    
        public double HourlyWage {
            get => hourlyWage;
            set {
                if (hourlyWage != value) {
                    hourlyWage = value;
                    NotifyPropertyChanged();
                }
            }
        }
        
        // ...
    
        public event PropertyChangedEventHandler PropertyChanged;
    
        private void NotifyPropertyChanged([CallerMemberName] string propertyName = "") {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
  2. Create a list of PayrollModel objects with sample data. This list will be used to supply data to the Spreadsheet control.

    readonly List payrollData = new List();
        
    // ... 
        
    payrollData.Add(new PayrollModel() {
        EmployeeName = "Linda Brown",
        HourlyWages = 10.0,
        RegularHoursWorked = 40,
        VacationHours = 5,
        SickHours = 1,
        OvertimeHours = 0,
        OvertimeRate = 15.0,
        OtherDeduction = 20.0,
        TaxStatus = 1,
        FederalAllowance = 4,
        StateTax = 0.023,
        FederalIncomeTax = 0.28,
        SocialSecurityTax = 0.063,
        MedicareTax = 0.0145,
        InsuranceDeduction = 20.0,
        OtherRegularDeduction = 40.0
    });
        
    // ...

Bind the Spreadsheet to Data

The data binding mechanism in this example is powered by our SpreadsheetBindingManager component. It includes an AddBinding method that allows you to bind the PayrollModel object’s properties to cells within the Payroll Calculator template:

spreadsheetBindingManager1.SheetName = "Payroll Calculator";
spreadsheetBindingManager1.AddBinding("EmployeeName", "C3");
spreadsheetBindingManager1.AddBinding("HourlyWage", "D6");
spreadsheetBindingManager1.AddBinding("RegularHoursWorked", "D8");
    
// ...

When a user edits a cell value, the SpreadsheetBindingManager updates the value of the corresponding data source property. All changes in data source property values are immediately reflected in bound cells.

Bind the list of PayrollModel objects to the SpreadsheetBindingManager and DataNavigator control via the BindingSource component.

// Bind the list of PayrollModel objects to the BindingSource.  
bindingSource1.DataSource = payrollData;

// Attach the BindingSource to the SpreadsheetBindingManager and DataNavigator control.  
spreadsheetBindingManager1.DataSource = bindingSource1;
dataNavigator1.DataSource = bindingSource1;

You can download a complete sample projects from the following repositories:

Additional Examples

Our installation includes other examples of data entry forms built with DevExpress Spreadsheet. Please refer to the following blog post to see how we built an invoice form with our spreadsheet component.

If you've installed the DevExpress Demo Center, the following links will allow you to load our Spreadsheet-powered data entry demos:

Your Feedback Matters

If you have implemented similar functionality in your desktop app (using our Spreadsheet control for data entry), please post your comments below. We’d love to learn more about your solution and how you’re using DevExpress Spreadsheet within your app.

Should you have technical questions, feel free to contact us via the DevExpress Support Center.

Blog Post: Blazor Components - New Charts, Data Grid Enhancements and more (available in Beta #2)

$
0
0

The second beta of the DevExpress UI for Blazor is now available and it includes new Chart and Data Visualization components, DataGrid enhancements, and support for Blazor Preview 8.

Blazor Preview 8 Support

As you may know, Microsoft recently announced the release of .NET Core 3.0 Preview 8. This release includes numerous updates to ASP.NET Core and Blazor. Components in this, our second beta fully support Preview 8.

Note: There is a critical issue in Preview 8 which may affect your Blazor projects. Please read the following announcement for more information.

Blazor Charts and Data Visualization Controls

Our second beta ships with an entirely new control set - DevExpress Charts for Blazor.

DevExpress Blazor Charts - Series

DevExpress Charts for Blazor allows you to create different chart types for your next Blazor project. Major features include:

Multiple Chart Series

The following Chart series are available:

  • Area: Stacked Area, Full Stacked Area, Spline Area, Stacked Spline Area, Full Stacked Spline Area, and Step Area.
  • Bar: Stacked Bar and Full Stacked Bar.
  • Line: Step Line, Stacked Line, and Full Stacked Line.
  • Bubble

We will introduce Financial and Range chart series support in an upcoming release.

Please explore our online demo to learn more about available chart types.

Table Data Binding

You can bind our Blazor Charts component to a data source that contains table-based data. The following chart series settings are available through the DxChartCommonSeries object:

  • NameField– Specifies the data field that provides series names.
  • AggregationMethod– A data aggregation method. You can use any predefined or custom function with Func<IEnumerable<TValue>, <TValue> signature. In our demo, we use a static Enumerable.Sum method available in .Net and Blazor.
  • ArgumentField– Specifies the data field that provides series arguments.
  • Value`Field – Specifies the data field that provides series values.

The SeriesTemplate can contain DxChartBarSeries, DxChartLineSeries, and other series objects to customize specific series types.

Please test drive our online demo to learn more.

Use our Blazor Pivot Grid as Data Source

Our Blazor Charts component can load and visualize data directly from our Blazor Pivot Grid component. The chart will also update itself instantly to reflect changes made to the pivot table.

You can synchronize DevExpress Blazor Charts with our Pivot Grid using DxPivotGridDataProvider<T>. The code below demonstrates use of the Create method (creates a data provider and asynchronously provides the IEnumerable<T> collection to this provider):

DxPivotGridDataProvider PivotGridDataProvider = DxPivotGridDataProvider.Create(Sales.Load());

The DxPivotGridDataProvider includes two data sources (PivotGridDataSource and ChartDataSource) for the Blazor Pivot Grid and Charts components. Use the NameField, ArgumentField, and ValueField properties to specify the fields of a data source object used for a chart’s series names, arguments, and values.

To group data by panes and create a separate pane for each group, set the PaneField property. When used, charts automatically display the most detail data level. When a user expands a row in the pivot grid, the chart displays expanded field values

Series Customization

You can display multiple axes and combine different chart types (e.g., bars and lines) in the same chart.

Use the DxChartTooltip object to specify a custom template for the tooltip displayed when users hover over a chart series.

The DxChartSeriesLegendItem component in a chart series markup allows you to customize legend item appearance, change legend position, and its visibility.

Additionally, DxChart provides built-in functionality to display and hide series when an end-user clicks a corresponding legend item:

DevExpress Blazor Charts - Series Legend

Mobile Friendly

The DevExpress Blazor Charts component is ready for use on tablets and mobile devices alike:

DevExpress Blazor Charts - Mobile Friendly

Data Grid - Your Feedback Matters

Thanks to your great feedback, we’ve added the following new features to our Data Grid:

1. New Sorting API

The DevExpress Blazor Data Grid provides a new API to control data sorting. Use the DxDataGrid.AllowSort property to control sort order availability for the grid control.

Additionally, each data column provides settings to manage sort order.

  • The AllowSort property allows sorting for a specific column.
  • The SortOrder property specifies sort direction.
  • The SortIndex setting sets column sort priority.

2. Multiple Column Sort

End users can also sort our Blazor Data Grid using multiple columns. Hold down the SHIFT key and click an unsorted column header and this field will be added to the list of sorted fields.

3. Cell Text Alignment

Our customers asked us to incorporate a cell text alignment option. The DevExpress DataGrid for Blazor now includes this option. By default, the grid aligns DxDataGridSpinEditColumn text to the right. Other cells can be aligned to the left. If you want to change this behavior, set the DxDataGrid.TextAlignment property to one of the following: Left, Center, Right, or Justify.

4. Command Buttons Enhancements

A command column (DxDataGridCommandColumn) provides three new Boolean properties to manage command buttons: NewButtonVisible, EditButtonVisible, and DeleteButtonVisible.

5. Command Buttons Customization

A new StartRowEdit method allows you to add edit functionality to a custom button located within or outside the data grid.

public void StartRowEdit(object dataItem);

The method accepts a dataItem object to identify the processed row. If the inner key value parameter is null, the grid creates a new row and switches the grid to edit mode.

We've created an example to show you how to use the StartRowEdit method and implement custom command buttons inside a DevExpress Blazor Data Grid component.

Getting Started and Ongoing Feedback

To get started with DevExpress UI for Blazor, simply create a new Blazor project and incorporate our controls as needed.

As always, your feedback matters. Please share your thoughts with us - we want to do everything possible to earn your business now and into the future.

Blog Post: eXpress Persistent Objects - Early Access Preview (v19.2)

$
0
0

As you probably know by now, we expect to release v19.2 within the next few months. The goal of this blog post is to share our newest XPO-specific features and give you the opportunity to test new functionality before we wrap up our current dev cycle.

XPO is available free-of-chargeIf you own an active Universal or DXperience subscription, you can download the preview build from the DevExpress Download Manager and test the features described in this blog post. . Once you do, please take a moment tell us whether these new features address your business needs. This will help us fine-tune our code before official launch.

.NET Core 3.0 Desktop SDK Support for WinForms and WPF Apps

XPO for .NET Core 3.0 WinForms and WPF apps can be added using the DevExpress.WindowsDesktop.* packages from our NuGet feed. For more information, please read this recent blog post.

ORM Data Model Designer & LINQ Enhancements

Our designer can now store connection strings in appsettings.json, generate JSON serialization and Dependency Injection extensions (all of which are very important for .NET Core projects). We also gave the designer a slight face-lift, added more meaningful error messages/text, and introduced support for SelectMany and WithDeleted methods in XPQuery. For more information, please read this recent blog post.

Custom Aggregates for collections of persistent objects

In addition to predefined aggregates (Sum, Count, Min, Max, Avg, Single, Exists),

XPO users can now implement custom aggregates. At this stage, you can use them to query data with XPO using XPQuery and with data sources that support CriteriaOperator (server mode collections are not yet supported).
// Criteria string for a custom aggregate with a detail collection property or Free Joins.
YourCollection.YourCustomAggregate(YourNestedProperty)


// Criteria string for a custom aggregate with a top-level collection of persistent objects.
[].CUSTOM_AGGREGATE('YourCustomAggregate', YourNestedProperty)

// LINQ to XPO usage of custom aggregates (CountDistinct and STDEVP) with a detail collection property.
new XPQuery<Customer>(theSession)
    .Select(t => new {
        ContactName = t.ContactName,
        CountDistinct = CountDistinctCustomAggregate.CountDistinct(
            t.Orders, o => o.ProductName
        ),
        QuantityVariance = STDEVPCustomAggregate.STDEVP(
            t.Orders, o => o.Quantity
        ),
        PriceVariance = STDEVPCustomAggregate.STDEVP(
            t.Orders, o => o.Price
        ),
     }).OrderBy(t => t.ContactName).ToList();

To create a custom aggregate, implement the following interfaces: ICustomAggregate, ICustomAggregateQueryable, ICustomAggregateFormattable. To register a custom aggregate, use the CriteriaOperator.RegisterCustomAggregate method - method - nearly the same process as that used when creating a custom criteria function. 

For more information, please refer to this WinForms sample on GitHub.

Using NuGet? Our unified .NET installer automatically configures the Local NuGet feed for you.

XPO Data Source for DevExpress Dashboard

We created the DevExpress.DashboardCommon.DashboardXpoDataSource component to help XPO users bind their persistent class data to DevExpress Dashboard (DevExpress Dashboard is part of the Universal Subscription).  You can configure the new component in code or use the built-in dashboard designer.

For more information, please refer to this WinForms sample on GitHub.

Your Feedback Matters!

Your thoughts and perspectives are always appreciated. Please use the comments section below, create a new Support Center ticket or email xpoteam@devexpress.com to engage us.
We know you’re busy, but we ask that you take a moment out of your schedule to answer the survey questions below. Thanks in advance for your participation.
NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: WPF - Early Access Preview (v19.2)

$
0
0

In this post, we'll detail some of the features we expect to ship in our next major release (v19.2) and invite active Universal and DXperience Subscribers to test new functionality before we complete our current dev cycle.

As always, we thank you for choosing our WPF components and for placing your faith in DevExpress.

.NET Core Support

Our v19.2 installation includes project templates for the .NET Core 3. You can find the new project templates in our Template Gallery.

These project templates allow you to create new WPF .NET Core applications and integrate DevExpress WPF controls within them without the need for manual integration.

DevExpress Template Gallery

Once the new .NET Core project is generated and built, you can drag DevExpress WPF controls from the toolbox onto the XAML designer or the markup.

DevExpress Visual Studio Toolbox Integration

WPF Data Grid & Tree List

Summary for Selection

The Data Grid and Tree List can now calculate summary values for selected rows or cells. You can enable this functionality for all group and total summaries:

Grid summary for selected rows

Demo Link:Data Grid - Web Style Row Selection

Alternatively, you can create individual summary items for selected rows/cells (in addition to standard totals):

Demo Link:Data Grid - Multi Row Selection

Though summary for selection needs to be recalculated every time a user changes selection, we made certain to maximize execution speed.

New Search Panel Parse Modes

Our WPF Search Panel introduces three new parse modes and provides the following search options:

Exact - the search engine does not split the query into individual words and thereby looks for exact matches:

pic

In this mode, the search engine treats all symbols as-is and does not support any special keywords.

Or - words in the search query are combined with the Or operator:

pic

And - words in the search query are combined with the And operator:

pic

Mixed (Default) - words in the search query are combined with the Or operator. The operator changes to And if you specify a column name before a search word:

pic

This mode was available prior to v19.2 and will remain the default option.

You can switch between WPF Search Panel's parse modes using the SearchPanelParseMode property, specify the filter condition (Contains, StartsWith, Equals, and Like) using the SearchPanelFindFilter property, or handle the SearchStringToFilterCriteria event to implement custom search logic.

Demo Link:Data Grid - Search Panel

Conditional Formatting Filters

You can now easily filter data in the Data Grid and Tree List by applying Conditional Formatting rules. Both the Filter Editor and the Excel-Style Drop-Down Filter can display available rules and indicate the number of records that meet rule conditions:

pic

The following Conditional Formatting rules are supported in our Early Access Preview:

Conditional Formatting rules planned for the official v19.2 release:

Demo Link:Data Grid - Conditional Formatting

Excel-Style Drop-Down Filter Enhancements

Our new Excel-Style Drop-Down Filter is now used in the Data Grid and Tree List by default. It includes various performance and stability enhancements and can now work with server-side data provided by Server Mode, Instant Feedback, or Virtual sources. For asynchronous sources, the Excel-style drop-down filter displays a loading indicator during the filter value retrieval process:

WPF Grid Excel-Style Drop-Down Filter

Demo Link:Data Grid - WCF Data Services

WPF Report Designer – Data Federation – Union Query Support

The DevExpress Data Federation Query Builder allows you to combine data from two federated queries using UNION and UNION ALL commands.

data federation query builder wpf

WPF Chart Control - TimeSpan Axis Scale Support

v19.2 will ship with full support for TimeSpan scales. You can plot your TimeSpan data as-is or specify a custom aggregation mode. TimeSpan data can be mapped to an X-Axis, Y-Axis or both.

Charts TimeSpan Axis Scale Support

Demo Link:Data Aggregation

Note: You can also use a new Chart Range Control client with TimeSpan scale support.

Chart Range Control client with TimeSpan scale support

Demo Link:Chart Client For Range Control

Blog Post:WinForms, WPF and ASP.NET Charting, WinForms and WPF Maps – Early Access Preview (v19.2)

WPF Maps - In-Memory Image Tile Provider

The ImageTileDataProvider now makes it possible to display custom tile images without saving them locally. You can load image tiles created at runtime from almost any source. To do this, create a bitmap for each tile based on its indices.

We published a sample project to illustrate this approach. You will find it in our GitHub repository.

WPF Rich Text Editor – Hyphenation

Our Word Processing Document API and WPF Rich Text Editor now supports soft hyphens and automatic hyphenation. You can load, print and export documents with soft hyphens, or insert hyphens within the UI using the Ctrl+- shortcut.

Link a dictionary that specifies hyphenation rules to enable automatic hyphenation. Please refer to the hyphenation-simple-example repository for a sample project.

Once you provide hyphenation dictionaries, you can enable or suppress automatic hyphenation in code or within the UI.

WPF Spreadsheet

Excel Binary Workbook (XLSB) Support

The Spreadsheet Document API and WPF Spreadsheet control now supports the XLSB (BIFF12) format. Give it a try and load and save your documents using this format.

Note: the Early Access Preview build has the following limitations:

  • Encryption is not supported for XLSB documents;
  • Slicers will be stripped from your binary files.

Status Bar

This release includes a new Status Bar for the DevExpress WPF Spreadsheet control. This status bar allows you to zoom (in or out) the current worksheet. When you select two or more cells with numeric data, the status bar displays the following summary information:

  • Number of selected cells (Count)
  • Number of selected cells with numerical values (Numerical Count)
  • Average
  • Minimum value (MIN)
  • Maximum value (MAX)
  • Sum

The Customize Status Bar context menu for our WPF Spreadsheet control allows you to show of hide status bar entries.

You can generate the status bar at design or runtime.

Please note that the status bar can only be displayed when using our Ribbon command UI.

WPF Gantt Control

Editing Events

In our previous release, we announced interactive editing in the Gantt Control. With v19.2, we have added a set of events that allow you to control each end-user action within the Gantt area.

These events allow you to:

  • Snap edited date-time values (task start date, finish date, and duration) with any step.
  • Allow end users start or end tasks during non-working time (the GanttControl does not allow this by default).
  • Provide visual feedback: highlight tasks that can be linked by an edited connector.
  • Cancel any end user edit action.

Demo Link: Gantt Control - Custom Snapping

Strip Lines

The GanttControl allows you to highlight specific regions in the Gantt area and indicate any date-time value or time range.

The control supports 3 strip line types:

  • StripLine - allows you to define a single strip line by specifying the start date and duration.

    <dxgn:GanttView.StripLines>
        <dxgn:StripLine StartDate="2019/8/13" Duration="10:0:0" Background="#FFFFE0A6"/>
    </dxgn:GanttView.StripLines>
  • StripLineRule - allows you to define a strip line that is applied multiple times (depending on its Recurrence property value).

    <dxgn:GanttView.StripLines>
        <dxgn:StripLineRule 
            Recurrence="{dxgn:Weekly DayOfWeek=Friday, Start=1/1/2019, Until=9/1/2019}" 
            Background="#3FFFEE53" 
            StartOffset="8:0:0" 
            Duration="8:0:0" />
    </dxgn:GanttView.StripLines>
  • CurrentDateTimeStripLine - a strip line that displays a DateTime.Now, and automatically updates its position onscreen.

    <dxgn:GanttView.StripLines>
        <dxgn:CurrentDateTimeStripLine Background="#FFFFE0A6"/>
    </dxgn:GanttView.StripLines>
gannt strip lines

You can define a strip line collection in markup or bind to a collection of strip lines from a View Model.

Demo Link: Gantt Control - Edit Limits

Critical Path

The GanttControl automatically calculates and highlights the critical path in the Gantt area. The critical path will automatically update whenever you move tasks or change duration.

Gantt critical path

WPF Scheduler Control

Recurrence Builder

The new RecurrenceBuilder class allows you to create recurrences using a fluent API style.

The code snippets below demonstrates how to set the RecurrenceInfo in code using the RecurrenceBuilder.

// the constructor approach
RecurrenceInfo recInfo = new RecurrenceInfo();
recInfo.Type = RecurrenceType.Daily;
recInfo.Start = pattern.StartTime;
recInfo.AllDay = true;
recInfo.End = pattern.EndTime.AddDays(dayCount);
recInfo.Range = RecurrenceRange.EndByDate;
recInfo.WeekDays = WeekDays.EveryDay;
// the RecurrenceBuilder approach 
RecurrenceInfo recInfo = (RecurrenceInfo)RecurrenceBuilder 
    .Daily(pattern.StartTime, pattern.EndTime.AddDays(dayCount))
    .ByDay(WeekDays.EveryDay)
    .Build();

You can also use the RecurrenceBuilder to create recurrences from an iCalendar (RFC 5545) text string.

CRUD Methods and Events

In previous builds, you could only edit an appointment collection by directly accessing it. We have added new methods and events that allow you to execute and control CRUD operations (create, read, update and delete appointments).

New events:

  • AppointmentAdding/AppointmentAdded
  • AppointmentRemoving/AppointmentRemoved
  • AppointmentEditing/AppointmentEdited
  • AppointmentRestoring/AppointmentRestored

The code snippet below demonstrates how to implement custom validation:

AppointmentEditing += (d, e) => { 
    foreach(var apt in e.EditAppointments) { //each edited appointment 
        bool res = Validate(apt); //is validated by a custom method 
        if(!res) //if the validation fails 
            e.CanceledEditAppointments.Add(apt); //the changes are cancelled for this appointment 
    } 
} 

New methods:

  • AddAppointment / AddAppointments
  • RemoveAppointment / RemoveAppointments
  • RestoreAppointment / RestoreAppointments
  • EditAppointment / EditAppointments

All methods raise corresponding events and return a Boolean value that indicates whether changes have been made.

Appointment Resize Events

In line with the drag&drop engine redesign in our v19.1 release, we have added new events designed to offer extended control over resize operations. These events include:

  • StartAppointmentResize
  • QueryContinueAppointmentResize
  • ResizeAppointmentOver
  • CommitAppointmentResize
  • CompleteAppointmentResize

WPF Pivot Grid Control - Aggregation at Any Level

This release includes an optimized calculation engine. It provides a more versatile function for summary expressions. The scope of the function is unbound fields. The Aggr function aggregates data with a specified summary function by a specified set of dimensions. Aggr functions can be nested, so you can easily create the necessary aggregation level.

The Aggr function has the following syntax:

Aggr(summaryExpression, dimension1, dimension2, ...)

The first argument is a summary expression calculated against a data source field. It is followed by a set of dimensions whose values are grouped to calculate summaries for the first argument.

WPF Diagram Control - Org Chart Layout

The new Org Chart automatic layout algorithm visualizes roles and relationships within an entity such as a company department. Shapes in the upper levels of hierarchy in the org chart layout are arranged using the tree graph algorithm. You can use the OrgChartLayoutTreeLevelCount property to specify the number of levels in the tree section. The lower levels of hierarchy are arranged using the tip-over tree layout algorithm.

alt

Demo Link:Diagram Control - Org Chart Layout

PDF Document API – Custom Properties

The PDF Document API allows you to manage a document's custom property collection. Use PdfDocument.CustomProperties to access the collection. You can add and delete custom properties or change assocated names or values.

Please check the pdf-document-api-custom-properties repository for a sample project.

//Add new property
document.CustomProperties.Add("NumberOfCopies", "3");

//Modify the CompanyEmail property value:
if (document.CustomProperties.ContainsKey("CompanyEmail"))
    document.CustomProperties["CompanyEmail"] = "clientservices@devexpress.com";

//Remove the HasImages property:
document.CustomProperties.Remove("HasImages");

WPF Breadcrumb Control - History

The Breadcrumb Control can now log navigation history and display recently accessed nodes in its drop-down window.

breadcrumb history

The HistoryChanging event allows you to exclude individual navigation actions from being logged.

In the following demo, history logging is enabled in the control, so you can navigate several folders and view navigation history in the Breadcrumb Control's drop down.

Demo Link:Breadcrumb - FileSystem

WPF Hamburger Menu – Reveal Highlight

The Reveal effect (Fluent design feature) is now applied to hovered Hamburger menu items. It indicates that the user can interact with a given menu item.

Hamburger Menu Reveal Highlight

Demo Link:Hamburger Menu

WPF Data Editors

Loading Indicator

Our lookup editors display loading indicator when they load large data sources. With v19.2, you can display a loading indicator for button editors (the ButtonEdit class descendants) that initiate lengthy operations.

editors loading indicator buttoninfo

Documentation:LoadingIndicatorButtonInfo

WPF Time Picker

The TimePicker control allows you to edit time values.

End users can change a time value in following ways:

  • drag the hour, minute, or second hand
  • edit the value within the built-in time edit.

The TimePicker control can be embedded within the DateEdit control's drop-down window.

Demo Link:Time Picker

Read-Only State

With v19.2, data editors in a read-only state are visually distinguished from those that can be edited.

Editor Read-Only State

WPF Application Themes

High-Contrast Theme

This update includes a new Microsoft Outlook-inspired High-Contrast theme:

High-Contrast Theme

You can find the theme in the ribbon theme gallery.

Demo Link:Outlook Inspired Demo

Palette Themes Cache

With v19.2 you can cache the current palette theme's assembly to reduce theme loading time. To enable theme cache, set the Theme.CachePaletteThemes property to true.

// App.xaml.cs code
Theme.CachePaletteThemes = true; 

Cached files are stored in the %LocalAppData%\DevExpress\PaletteThemesCache directory by default. Use the PaletteThemesCacheDirectory property to define a new cache directory location.

You can call the Theme.ClearPaletteThemesCache method to clear the theme cache as needed.

Documentation:Theme.CachePaletteThemes

Get Started with v19.2 Today

If you own an active Universal or DXperience subscription, you can download our early access preview build via the DevExpress Download Manager.

As always, your feedback will help us deliver the best possible build. Should you have questions about these new features or should you experience technical issues during the early preview, please contact us via the DevExpress Support Center or the comment section below.

If you are using a trial version and would like to access these new features today, purchase a Universal or DXperience subscription license and you will automatically receive access to the early access preview. If you are ready to upgrade to Universal or DXperience from another subscription level, email us at clientservices@devexpress.com for preferential upgrade pricing.

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: WinForms, WPF and ASP.NET Charting, WinForms and WPF Maps - Early Access Preview (v19.2)

$
0
0
v19.2 is right around the corner and as such, it’s time to show off some of the new features we expect to ship in the fourth quarter. The purpose of this post is to both share our plans and give you the opportunity to test new functionality before we reach "code freeze." If you own an active Universal or DXperience Subscription, you can download the early access preview build from the DevExpress Download Manager and test the features described herein. Your feedback will help us make this release the best ever – please take a moment to share your thoughts and let us know whether these enhancements address specific business requirements.
If you are using a trial version and want immediate access to the features described in this blog post, purchase a Universal Subscription (or DXperience Subscription) to obtain access to this early access build. If you are ready to upgrade to Universal (or DXperience) from another subscription, email us at clientservices@devexpress.com for preferential upgrade pricing.

Charts - TimeSpan Axis Scale Support (WinForms, WPF, ASP.NET)

v19.2 will ship with full support for TimeSpan scales. You can plot your TimeSpan data as-is or specify a custom aggregation mode. TimeSpan data can be mapped to an X-Axis, Y-Axis or both.

Try it today: WinForms demo | WPF demo (see the Time-Span tab)


Note: You can also use a new Chart Range Control client with TimeSpan scale support. 

Try it today: WinForms demo | WPF demo

Charts - Waterfall Series (WinForms, WPF, ASP.NET)

Waterfall charts display the manner in which initial values are affected by a series of intermediate positive or negative values. You can plot Waterfall charts based on relative or absolute data values. We have also implemented two summary types: Total bar summarizes all values and is always positioned on the right side of the chart's diagram; Subtotals can be defined between two adjacent points (bars) to display intermediate values.
Note: This early access release only includes our WinForms implementation. This features will be added to both our ChartControl for WPF and WebChartControl for ASP.NET prior to official release. 

Try it today: WinForms demo

Charts - Box Plot Series (WinForms, WPF, ASP.NET)

The Box Plot chart is a simple way to analyze statistic-driven data points. To draw a Box Plot point, you must specify Min, Quartile1, Median, Quartile3 and Max parameters. You can optionally display a set of Outliers and a Mean value.
Note: This early access release only includes our WinForms implementation. This features will be added to both our ChartControl for WPF and WebChartControl for ASP.NET prior to official release. 

Try it today: WinForms demo

Maps - HeatMap Data Provider (WinForms, WPF)

v19.2 includes a new cartographic visualization option – a heat map. To create a heat map, use our new data provider (HeatMapDataProvider) linked to geographical point data (latitude and longitude) and define the heat map color schema using PaletteBasedChoroplethColorizer.

Try it today: WinForms demo

Maps - A new Gradient Mode for ColorScaleLegend (WinForms, WPF)

v19.2 includes a new EnableGradientScale property. This property allows you to enable gradient fill mode for Color Scale Legend items. 

Try it today: WinForms demo

Maps - In-Memory Image Tile Provider (WinForms, WPF)

The ImageTileDataProvider now makes it possible to display custom tile images without saving them locally. You can load image tiles created at runtime from almost any source. To do this, create a bitmap for each tile based on its indices.

We published sample projects to illustrate this approach. You will find them in our GitHub repository: WinForms, WPF.

Your Feedback Counts

As I mentioned earlier, your feedback matters. If you own an active Universal or DXperience Subscription, please download the early access preview and share your thoughts with us.

If you’re currently using our charting libraries and data visualization components, we’d love to hear from you.
NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: WinForms Reporting: Meet the New Cross Tab Report Control - Early Access Preview (v19.2)

$
0
0

We are about two months away from the official v19.2 launch, so we wanted to share our progress and let you test major new functionality before we wrap up another development cycle.

If you are an active Universal or DXperience subscriber and would like to test upcoming v19.2 features prior to the official release, you can download the early access preview build from the DevExpress Download Manager and test the features described in this blog post. Let us know how well the new functionality address your requirements. This might help us fine-tune the implementation before the official release.

If you are using a trial and want to try this feature today, you can purchase a DevExpress Universal or DXperience license online (this will give you access to early builds such as this one). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for preferential upgrade pricing.

Introducing our New Cross Tab Report Control

v19.2 includes the launch of our new Cross Tab report control.  As you will soon discover, we’ve done our best to resolve limitations associated with our XRPivotGrid report control and introduce the necessary features to make code-free cross tab reporting a reality.

Cross Tab Report Demo
Requires installation of WinForms Reporting Demos included into this early preview build.

Key Features

Report Wizard: Quickly Create Cross Tab Reports

We've added a new Cross Tab report type to our Report Wizard for both the DevExpress Visual Studio Report Designer and WinForms End-User Report Designer.

In the next page, users can select data source fields for each cross tab region… 

Cross Tab Wizard - Choose Fields

….and generate/compete the report by selecting page and control theme settings:

Cross Tab Wizard Result

Manual Cross Tab Configuration: Drag Fields from the Field List

The new Cross Tab report control allows you to define its layout via drag & drop. The control’s DataSource and DataMember property values are automatically set once you drop a field onto the cross tab:

Drag and Drop from the Field List

Built-in validation prevents you from adding data source fields from another data source. This helps you avoid errors while generating the cross tab layout:

Drag and Drop Validation

In addition, validation prevents you from binding cross tab cells to report parameters:

Parameter Validation

Aggregate and Shape Data: Use Multiple Summary Types, Group Intervals and Sort Options

With our next major release, you’re no longer need to dig within nested properties to change the manner in which data cells calculate data. Use the SummaryType and SummaryDisplayType Data Cell properties to specify the desired summary type and the way in which a calculated value correlates to summary values in other cells:

Summary Types For Data Cells

Use the GroupInterval, SortBySummaryInfo and SortOrder properties of Tab Header Cells to combine column and row fields into groups (and apply the appropriate sort order):

Row and Column Header Expressions

Format Data Using Expressions

Select a cell and navigate to the properties panel to define expressions used for its appearance properties:

Define an Expression

Use data source fields to conditionally format data cells:

Conditional Formatting

Our Expression Editor includes both GroupRowIndex and GroupColumnIndex arguments (specific to Cross Tab control cells). These arguments allow you to format data based on group index. For instance, here’s how you can define the background color for odd and even rows:

Odd And Even Styles

Use Report Styles

The Cross Tab report control offers 4 visual styles: General, Header Area, Data Area and Total Area. Use general style to define common appearance properties for all cross tab cells and then customize the appearance of the other regions using relevant styles:

Cross-Tab Styles

If Header, Data and Total Area styles are not fully defined, the values used by General style will be used automatically. Should you wish to manage appearance settings manually, simple select a cross tab cell and change appearance properties (BackColor, ForeColor, Font, etc.) as needed.

Intuitively Hide Data Cells, Totals and Headers

Select a cell and use RowVisible and ColumnVisible properties to manage row or column visibility. An invisible area is filled with a hatch brush. The same behavior applies to column and row totals:

Cross Tab - How to hide a column or row

Customize Print Layout Using Control Properties

Use the Cross Tab control’s smart tag to quickly customize printed output:

  • Corner Header Display Mode. Remove the blank region at the left top corner of the control -Choose what to print between the Row and Column Field Names or leave that area empty using the third property value:

    Cross Tab - Corner Header Display Mode

  • Data Field Layout. Choose how to display multiple data field values and associated headers. Select between In Row and In Column modes:

    Cross Tab - Data Field Layout

  • Totals Position. Use ColumnTotalsPosition and RowTotalsPosition to specify the way in which totals are printed across columns and rows, before or after data.

    Cross Tab - Column Totals Location

  • Print Layout. Specify the Cross Tab's "growth" and print direction. See the figure below for available options:

  • Repeat Column And Row Headers. Specify whether the Cross Tab control repeats column and row headers across page breaks.
  • Rotate text displayed in cells. All Cross Tab cells provide an Angle property. This allows you to print column and row headers vertically:

    Cross Tab - Vertical Headers

  • Provide text for empty cells. Use the NullValueText property to specify custom text for empty cells.
  • Automatically adjust a column width based on its content. Set the ColumnAutoWidthMode property to a value associated with the AutoSizeMode enumeration to achieve the desired result.

Avoid Use of the Prefilter Property While Filtering Data

You’re no longer required to handle events, obtain filter values and manually construct the filter string at runtime to filter pivot table data. The Cross Tab report control offers both a FilterString and Parameters property. OF note is the latter: this is a collection of internal cross tab parameters. They allow you to provide values outside a cross tab control’s data source. Whether it’s a report parameter or a report’s data source field value, you can now pass it down further to the cross tab control:

Cross Tab - Filtering by Parameters

This feature is useful for those who need to pass report parameter values directly to the Cross Tab control or filter its data based upon a report’s grouping (when the Cross Tab is located in a group band). 

Convert your Pivot Grid to the Cross Tab with One Click

The XRPivotGrid control smart tag now includes a "Convert to Cross Tab" option. As its name implies, this option allows you to convert your XRPivotGrid to our new Cross Tab report control.

Convert Pivot Grid to Cross Tab

Please Note: Should you encounter issues or are unhappy with the conversion process, you can revert back via the "Revert to Original Pivot Grid" smart tag option within the Cross Tab control: 

How to return back XRPivotGrid

Your feedback will help us enhance this conversion process. Please let us know how we can improve our implementation. 

Questions and Answers

Q: What will happen toXRPivotGrid?

A: We don't expect to develop this report control further. Our long-term goal is to enhance and extend our Cross Tab control.   

Q: What will happen to reports that rely on XRPivotGrid?

A: We will not remove  XRPivotGrid from our distribution.  All your reports will continue to render/export without interruption.  And yes, you can use both controls within the same report should you wish to transition to our new control.

v19.2 Release Notes

As you can see, we’ve invested quite a bit of time on our new Cross Tab report control.  This feature affected resource allocation and we were forced to spend less time on capabilities outlined in our v19.2 roadmap. We’ll do our best to make this release as feature rich as possible, but we’re likely to postpone the release of several features detailed in our 2019 roadmap. Please stay tuned for further updates. 

Your Feedback Counts

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use.This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: WinForms - Early Access Preview (v19.2)

$
0
0

We are about two months away from our next major release (v19.2). As part of our ongoing commitment to engage the DevExpress developer community, we wanted to share our progress and give you the opportunity to test major new functionality before we wrap up our current development cycle.

If you own an active Universal or DXperience subscription, you can download the EAP build from the DevExpress Download Manager and try out the features described in this blog post. Your feedback will help us fine-tune the features listed herein and to address outstanding technical issues.

Please Note: For this release, we’re creating separate Support Center tickets for each major new feature. This will allow us to publish detailed implementation information and associate your feedback to appropriate products/features.

New WinForms Gantt Control

A much-anticipated addition to our WinForms component line-up, the new DevExpress WinForms Gantt Control is a powerful project management tool that allows you to schedule tasks and effectively monitor project progress.

Gantt Control thread on Support Center
Documentation (beta)
Demo

WinForms Dock Manager - Dock Panels to Center

Our DockManager now allows you to dock its panels to a parent container’s center region. Previously, you had to add the DocumentManager component to provide the central area that can accept these panels. Modern docking guides (hints) are also available for the DockManager out-of-the-box and do not require a separate DocumentManager component.

Dock Panels to Center thread on Support Center
Blog post
Demo

Search modes for Items within WinForms Lookup Editors

With v19.2, DevExpress LookUpEdit and GridLookUpEdits controls support a user-friendly search option.

In AutoSuggest mode, our WinForms Lookup editor fires an AutoSuggest whenever a user enters text within it. You can handle this event and assign an asynchronous Task to the QuerySuggestions parameter to populate your lookup list. This asynchronous Task should check the text entered within the lookup and return an item collection for the editor’s drop-down window.

Unlike AutoSuggest (designed for unbound editors), AutoSearch mode was designed for bound lookup editors. AutoSearch unlocks the editor’s text box and allows users to enter “search” criteria within it. The editor hides data source records that do not match the text entered within the text field and displays matching entries within its drop-down window.

Support Center threads:AutoSuggest | AutoSearch
Blog Posts:AutoSuggest | AutoSearch
Demos:AutoSuggest | AutoSearch
Documentation

With this release, you can now select.NET Core when using DevExpress WinForms Template Galleries. We’ve updated all three Gallery types: New Project, Add DevExpress Item, and Predefined Form Templates.

Note: .NET Core still lacks design-time support for WinForms applications. Once Microsoft finalizes design-time support, we will make an announcement in a separate post. As you may already know, .NET Core 3.0 Preview 8 requires Visual Studio 2019. Visit Visual Studio Preview to learn more.

Documentation

New WinForms TreeList Filter Mode

You can now choose “EntireBranch” for our WinForms Tree List’s FilterMode property. When using this mode, the Tree List displays matching nodes for all of parent and child nodes.

New TreeList Filter Mode thread on Support Center
Documentation
Demo

WinForms Data Grid - Search and Group Panel Integration

With this release, our Search Panel and Group Panel are combined into a single element. The Group Panel now displays a “Search” button at its rightmost edge. When clicked, it reveals a search text box. This new layout maximizes uses of screen real-estate and prevents the control from moving records up or down when users invoke and hide the Search Panel.

This layout is enabled by default. If you wish to revert to two separate panels, set the OptionsFind.FindPanelLocation property to GroupPanel.

Search and Group Panels Integration thread on Support Center
Documentation
Demo

HTML Formatting

We’re adding the <sub></sub> and <sup></sup> tags to the list of supported HTML-inspired tags. These tags allow you to draw strings a half-character higher or lower than standard text.

The new <font> tag allows you to specify custom fonts as needed:

<font='Times New Roman'size=5 color=red>Important text</font>

Our new <r> tag resets all bold, italic, underline and strike-through text back to a normal state (applies to text that follows the tag). This tag resets text formatting styles applied with other HTML tags, and appearance\skin settings.

Our HTML-inspired tags can now be used within Scheduler appointments/events.

New HTML Tags thread on Support Center
Demos:HyperTextLabel | Scheduler DayView
Documentation

WinForms DataGrid - CheckBox Selection Enhancements

You can now set the GridOptionsSelection.GridMultiSelectMode property to the “CheckBoxRowSelect” value for Banded and AdvancedBanded Views.

Additionally, when the checkbox selection state is bound to a data source field (the CheckBoxSelectorField property), you can still enable the ShowCheckBoxSelectorInGroupRow property and display check boxes within group rows. In versions prior to v19.2, group row check boxes were unavailable when using bound selection mode.

CheckBox Selection Enhancements thread on Support Center
Demo

WinForms Pivot Grid - Aggregation at Any Level

This release includes an optimized WinForms Pivot Grid calculation engine. This new engine provides a more versatile summary expression function. The scope of the function is unbound fields. The Aggr function aggregates data with a specific summary function against a specific set of dimensions. Aggr functions can be nested as needed (you can easily create the desired aggregation level within the control).

The Aggr function has the following syntax:

Aggr(summaryExpression, dimension1, dimension2, ...)

The first argument is a summary expression calculated against a data source field. It is followed by a set of dimensions whose values are grouped to calculate summaries for the first argument.

Aggregation at Any Level thread on Support Center
Filter Sales by Year by Country demo
Average Sales by Year demo

Report Designer – Data Federation – Union Query Support

The DevExpress Data Federation Query Builder allows you to combine data from two federated queries using UNION and UNION ALL commands.

Reporting – Cross Tab Control

Thanks to great feedback from our loyal users, we’ve extended the capabilities of DevExpress Reporting with a new WinForms Cross Tab Report control. To learn more about its capabilities, please review the following blog post.

Charts - TimeSpan Axis Scale Support

v19.2 will ship with full support for TimeSpan scales. You can plot your TimeSpan data as-is or specify a custom aggregation mode. TimeSpan data can be mapped to an X-Axis, Y-Axis or both.

Demo

Note: You can also use a new Chart Range Control client with TimeSpan scale support.

Demo

Charts - Waterfall Series

Waterfall charts display the manner in which initial values are affected by a series of intermediate positive or negative values. You can plot Waterfall charts based on relative or absolute data values. We have also implemented two summary types: Total bar summarizes all values and is always positioned on the right side of the chart's diagram; Subtotals can be defined between two adjacent points (bars) to display intermediate values.

Demo

Charts - Box Plot Series

The Box Plot chart is a simple way to analyze statistic-driven data points. To draw a Box Plot point, you must specify Min, Quartile1, Median, Quartile3 and Max parameters. You can optionally display a set of Outliers and a Mean value.

Demo

Maps - HeatMap Data Provider

v19.2 includes a new cartographic visualization option – a heat map. To create a heat map, use our new data provider (HeatMapDataProvider) linked to geographical point data (latitude and longitude) and define the heat map color schema using PaletteBasedChoroplethColorizer.

Demo

Maps - A new Gradient Mode for ColorScaleLegend

v19.2 includes a new EnableGradientScale property. This property allows you to enable gradient fill mode for Color Scale Legend items.

Demo

Maps - In-Memory Image Tile Provider

The ImageTileDataProvider now makes it possible to display custom tile images without saving them locally. You can load image tiles created at runtime from almost any source. To do this, create a bitmap for each tile based on its indices.

We published a sample GitHub project to illustrate this approach.

Word Processing – Hyphenation

Our Word Processing Document API and WinForms Rich Text Editor now supports soft hyphens and automatic hyphenation. You can load, print and export documents with soft hyphens, or insert hyphens within the UI using the Ctrl+- shortcut.

Link a dictionary that specifies hyphenation rules to enable automatic hyphenation. Please refer to the GitHub repository for a sample project.

Once you provide hyphenation dictionaries, you can enable or suppress automatic hyphenation in code or within the UI.

Spreadsheet – Excel Binary Workbook (XLSB) Support

The Spreadsheet Document API and WinForms Spreadsheet control now supports the XLSB (BIFF12) format. Give it a try and load and save your documents using this format.

Note: the Early Access Preview build has the following limitations:

  • Encryption is not supported for XLSB documents;
  • Slicers will be stripped from your binary files.

Spreadsheet – Status Bar

This release includes a new Status Bar for the DevExpress WinForms Spreadsheet control. This status bar allows you to zoom (in or out) the current worksheet. When you select two or more cells with numeric data, the status bar displays the following summary information:

  • Number of selected cells (Count)
  • Number of selected cells with numerical values (Numerical Count)
  • Average
  • Minimum value (MIN)
  • Maximum value (MAX)
  • Sum

You can generate the status bar at design or runtime.

Please note that the status bar can only be displayed when using our Ribbon command UI.

PDF Document API – Custom Properties

The PDF Document API allows you to manage a document’s custom property collection. Use PdfDocument.CustomProperties to access the collection. You can add and delete custom properties or change associated names or values.

Please check the GitHub repository for a sample project.

New Vector Skins

With v19.2, the default skin used for any DevExpress-based project will be “Basic” - a brand-new vector theme that replaces our raster-based skin (“DevExpress Style”). The skin ships with six color variations (palettes).

We’re also adding three new vector Office 2019 skins - “Black”, “White”, and “Dark Gray.”

PerMonitorV2 Support

As a part of our on-going commitment to our developer community, we’ve implemented PerMonitorV2 support for a number of DevExpress controls. This option allows controls to scale differently based upon the DPI factor applied to the display/monitor.

This DPI-awareness mode requires .NET Framework 4.7 and Windows 10 (build 1703 or newer).

Please Note: PerMonitorV2 currently works for a limited number of controls. Our goal is to extend support and address outstanding limitations prior to the launch of v19.2.

High DPI support in Windows Forms (Microsoft)

Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: Xamarin.Forms UI Controls - Early Access Preview (v19.2)

$
0
0
This post summarizes our Xamarin.Forms development plans for this release cycle and what you can expect from DevExpress in our upcoming release (v19.2).
At present, DevExpress Xamarin.Forms UI controls are part of our Universal Subscription. If you own an active Universal Subscription, you can download our early access preview build via the DevExpress Download Manager. DXperience subscribers can explore our Xamarin.UI controls by installing a trial version of this early access preview.

Xamarin Data Grid

We've extended the customization and interactive capabilities of our Xamarin Data Grid as follows:

  • New templates are available for the following elements:
    • Column Header
    • Group Row, Group Row Caption
    • Group Summary
    • Total Summary
    • Swipe Item

  • You can now specify the default Swipe action.

  • Data cells and Column headers now support a LineBreakMode property.
  • Text cells can be edited in multi-line display mode.
  • Custom Group Row height can be specified via the GroupRowHeight property.
  • New options to customize Scrollbar display mode (VerticalScrollBarVisibilityHorizontalScrollBarVisibility) are now available.

Features that are currently in development and therefore not included in this early access preview:

  • Input validation
  • Excel-inspired conditional formatting
  • Export to Excel

Xamarin Charts

  • We have significantly improved the data processing performance of our Xamarin.Forms Chart controls. Data is now loaded at least 10x times faster than in previous builds - Loading speed is nearly the same as that found in our native charting component for iOS and Android. For instance, you can easily process more than 500.000 points without significant UI delay.

  • New data adapters are available for Cartesian and Pie Series (SeriesDataAdapter, PieSeriesDataAdapter, CalculatedSeriesDataAdapter). These adapters support data collections that implement the IBindingList or INotifyCollectionChanged interfaces and allow you to bind to IList, IList<T>, and DataTable collections directly (no need to implement a custom data adapter).
  • We expect to support Secondary Axes prior to official launch (our early access preview does not include this feature).

Xamarin Scheduler and Calendar

  • We changed our Scheduler View implementation by creating separate UI View components for each Scheduler View type (Day View, Week View, Work Week View, Month View). You can now place a specific view on a page instead of using our old SchedulerView component (used for all view types). Scheduler Views obtain data from either a local or shared storage (SchedulerDataStorage) source.

  • Our New Xamarin Reminders API is now available. You can plug it into a platform specific alarm system using the RemindersChanged event and the GetNextReminders method of the data storage object.

  • Our Xamarin Scheduler ships with time zone support. You can specify a working time zone (using the data storage’s TimeZone property) for the Scheduler as a whole or control time zone settings for each appointment individually. We also added the ability to edit the zone information within the default Appointment Edit page.


  • In addition to our existing template customization method, we added a flexible mechanism to customize nearly all visual elements via platform-specific views. You can create a native view for all cells, appointments, and headers and reuse or cache views when necessary.

v19.2 will include two new controls:

  • TabPage

  • DrawerPage - A drawer panel that provides access to app navigation menu items and settings.

Note: We expect to add badges for tab headers in our Xamarin TabView (the early access preview build does not include this feature).

Your Feedback Counts

If you own an active Universal Subscription, please download the early access preview and share your thoughts with us. Your feedback will help us fine tune our Xamarin product line prior to official release.

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: Office Inspired Controls and File API – Early Access Preview (v19.2)

$
0
0

In this post, we'll detail some of the features we expect to ship in our next major release (v19.2) and invite active Universal and DXperience Subscribers to test new functionality before we complete our current dev cycle.

As always, we thank you for choosing our Office components and for placing your faith in DevExpress.

Word Processing – Hyphenation

Our Word Processing Document API and Rich Text Editor (WinForms and WPF) now supports soft hyphens and automatic hyphenation. You can load, print and export documents with soft hyphens, or insert hyphens within the UI (WinForms & WPF) using the Ctrl+- shortcut.

Link a dictionary that specifies hyphenation rules to enable automatic hyphenation. Please refer to the hyphenation-simple-example repository for a sample project.

Once you provide hyphenation dictionaries, you can enable or suppress automatic hyphenation in code or within the UI (WinForms & WPF).

Spreadsheet – Excel Binary Workbook (XLSB) Support

The Spreadsheet Document API and WinForms and WPF Spreadsheet controls now supports the XLSB (BIFF12) format. Give it a try and load and save your documents using this format.

Note: the Early Access Preview build has the following limitations:

  • Encryption is not supported for XLSB documents;
  • Slicers will be stripped from your binary files.

Spreadsheet – Status Bar

This release includes a new Status Bar for both the DevExpress WinForms and WPF Spreadsheet control. This status bar allows you to zoom (in or out) the current worksheet. When you select two or more cells with numeric data, the status bar displays the following summary information:

  • Number of selected cells (Count)
  • Number of selected cells with numerical values (Numerical Count)
  • Average
  • Minimum value (MIN)
  • Maximum value (MAX)
  • Sum

The Customize Status Bar context menu for our WPF Spreadsheet control allows you to show of hide status bar entries.

You can generate the status bar at design or runtime.

Please note that the status bar can only be displayed when using our Ribbon command UI.

PDF Document API – Custom Properties

The PDF Document API allows you to manage a document’s custom property collection. Use PdfDocument.CustomProperties to access the collection. You can add and delete custom properties or change associated names or values.

Please check the pdf-document-api-custom-properties repository for a sample project.

// Add new property
document.CustomProperties.Add("NumberOfCopies", "3");

// Modify the CompanyEmail property value:
if (document.CustomProperties.ContainsKey("CompanyEmail"))
    document.CustomProperties["CompanyEmail"] = "clientservices@devexpress.com";

// Remove the HasImages property:
document.CustomProperties.Remove("HasImages");

Get Started Today

If you own an active Universal or DXperience subscription, you can download our Early Access Preview build via the DevExpress Download Manager.

As always, your feedback will help us deliver the best possible build. Should you have questions about these new features, or should you experience technical issues during the Early Access Preview, please contact us via the DevExpress Support Center or the comment section below.

If you are using a trial version and would like to access these new features today, purchase a Universal or DXperience subscription license and you will automatically receive access to the Early Access Preview version. If you are ready to upgrade to Universal or DXperience from another subscription level, email us at clientservices@devexpress.com for preferential upgrade pricing.
NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: DevExpress Dashboard - Early Access Preview (v19.2)

$
0
0

v19.2 - our next major update - is a couple of months away. As such, we wanted to share the features we expect to ship in October and invite all active DevExpress Universal users to download our early access preview. Your feedback will help us refine these new features and allow us to ship the best possible royalty-free Dashboard platform in the marketplace.

WinForms Dashboard - Asynchronous Data Processing and Rendering

Our next major release will include the first version of DevExpress Dashboard's Asynchronous Data Processing and Rendering Engine for the WinForms platform. As its name implies, this engine was designed to decouple data processing from UI-related threads. Yes, with v19.2, your users will be able to continue using your app while time-consuming operations are performed on the server side.

To switch the Dashboard Viewer/Designer to Async mode, you will simply set its AsyncMode property to true.

The Advantages of Asynchronous Data Processing

  • Responsiveness: We render dashboard widgets more quickly. Your application will be more responsive and feel "lighter."

  • Immediate Rendering: Asynchronous data processing helps accelerate dashboard data calculations and rendering – Items appear sequentially as they are ready (data that is processed first appears without waiting for more time-consuming calculations).

WinForms Dashboard - Asynchronous Data Processing and Rendering

Note: If you currently handle control events, please be aware of API changes designed to support the modified lifecycle of the Async data processing. We've created a migration guide to simplify the transition process ( KB article ). Full product documentation will be published prior to official release.

As you can imagine, this early access preview ships with a number of limitations. We are actively working on our Async API, and testing our UX. This reality notwithstanding, we encourage you to evaluate our implementation and experience the performance advantages first-hand. We need your help so please do share your thoughts and your technical issues with us.

Web Dashboard Themes

Our next major release will include an extended web theme set and allow you to create custom themes as needed.

Predefined Themes – Powered by DevExtreme

Since our Dashboard is tightly integrated with our DevExtreme component library, many of you have asked us to fully support DevExteme's set of Predefined Themes. In this early access preview, you can use any Generic DevExtreme theme within your project.

Web Dashboard Themes

To explore this new option, simple open an existing v19.2 Web Dashboard Demo and switch between themes using the dropdown button within the Dashboard Title.

Note: Material themes are not available in this early access preview. Material design support involves numerous moving parts and though we hope to include support once v19.2 ships, we may have to defer this feature.

Custom Themes and Command-Line Interface

For those who wish to create a custom Dashboard theme and those who have already created a custom theme using the DevExtreme ThemeBuilder, v19.2 includes our new Dashboard Theme Builder CLI (command line interface).

Our Dashboard Theme Builder CLI is a command line tool based on Node.js and was designed to work together with DevExtreme ThemeBuilder. It allows you to create a custom Web Dashboard theme with ease.

The following KB article details usage of our new Theme Builder CLI.

Note: In this early access preview, we do not apply palettes to data-specific colors (present in our Chart, Range Filter, TreeMap and other visualization widgets). Palettes used in these Items are tightly bound with data, and we don't expect to make modifications to our existing implementation. You can customize specific colors by handling the CustomPalette event. If this does not address your requirements, please comment below. We'll be happy to review your use-case in greater detail and reconsider our implementation if necessary.

Data Inspector

We've created a basic UI to allow end-users to inspect data (underlined or aggregated, at your discretion) used to populate our visualization widgets.

Data Inspector - DevExpress Dashboard

To invoke this dialog, use one of the following methods:

  • click "Data Inspector" in the Dashboard Item Caption. The item is visible if the AllowInspectAggregatedData or AllowInspectRawData property is true;
  • call the ShowDataInspector method within your own UI.

The new UI is available for all platforms (WinForms Dashboard, WPF Dashboard, Web Dashboard). We activated this feature for all DevExpress Dashboard Demos in this early access preview.

JSON DataSource

You can now use JSON Data Source to feed JSON data to Dashboards - across every platform.

End-users can create a JSON data source with the Data Source Wizard available in our WinForms Designer and Web Dashboard.

JSON DataSource - DevExpress Dashboard

You can use the new DashboardJSONDataSource class to create the JSON data source in code.

XPO DataSource

DevExpress Dashboard now supports our XPO Data Source. You can bind your XPOBusiness Model to DevExpress Dashboard (feel free to use our WinForms Dashboard Wizard for this task).

You can also instantiate the DashboardXpoDataSource in code and add it to your dashboard / data source storage as follows:

DashboardXpoDataSource dataSource = new DashboardXpoDataSource() {
    ConnectionStringName = "nwind"
};

dataSource.SetEntityType(typeof(Products));

Data Federation – Union

Our Data Federation Data Source now supports Union operations.

When creating a new federated query in our WinForms Wizard, you can select the appropriate operation type – Join, Union or Union All

Data Federation Data Source - Union - DevExpress Dashboard

In addition, our API allows you to create complex queries when a Federation Data Source performs a Join with one data source and a Union operation with another data source. The query is generated as illustrated in the following code snippet:

DashboardFederationDataSource federationDataSource = new DashboardFederationDataSource();
var msSource = new Source("MSSQL Source", msSqlDataSource, "query");
var mySqlSource = new Source("MySQL Source", mySqlDataSource, "query");
var excelSource = new Source("Excel Source", excelDataSource, "");

var query =
    msSource.From().Select("ProductName", "CategoryID").Build("MSSQL select")
    .UnionAll(mySqlSource.From().Select("ProductName", "CategoryID").Build("MySQL select"))
        .Build("Products union")
    .From().Select("ProductName")
        .Join(excelSource, "[Products union].[CategoryID] = [Excel Source].[CategoryID]").Select("CategoryName")
    .Build("query");
federationDataSource.Queries.Add(query);

Extract Data Source API

We extended our Extract Data Source API and made it easier to manage millions of data rows. (if you've not evaluated Extract Data Source, we recommend that you consider it for future projects as it is blazing fast.

Some of you reported issues when updating your Extract Data Source in the concurrent multi-user request world of the web. Our current workaround required that you write code to address this issue. With v19.2, you can use the following straightforward API:

DashboardExtractDataSource.UpdateFile(extractDS,
    (_, result) => logger.Log("onDataUpdated", result),
    (_, result) => logger.Log("onFileUpdated", result));
extractDS.Dispose();

Behind the scenes, we redirect data requests to a new file and delete the old file when it is no longer necessary. This operation is seamless. No additional thread synchronization tasks are required on your end.

Data Federation + Extract

We improved how our Data Federation and Extract Data Sources work together.

With v19.2, you can create an extract from your Federation Data Source. You can also include Extract Data Source in the Federation Data Source and join/union with other data sources.

Window Function for Calc Fields

Back in v16.1, we enhanced our DevExpress Dashboard with Window Calculations , available at Dashboard Item's level. Since then we collected a (very little) number of your request to perform similar calculations on the previous data processing step, before the data was aggregated to be displayed.

You can now do it in your Calculated Field with our new w function.

To better illustrate its concept, we have created this article which gives examples of various aggregation types so you can compare and analyze.

Before We Let You Go

To better address your business needs, we ask that you complete the following DevExpress Dashboard product survey. We'd love to know how you're using DevExpress Dashboard and how we can better address your needs in 2020. The survey should only take 4 ½ minutes to complete (yes, we’ve made certain to keep it short and to the point). 

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use. This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.

Blog Post: Web Reporting - Early Access Preview (v19.2)

$
0
0

As you may already know by now, we are nearing the official launch of v19.2. The goal of this post is to share our progress and give you the opportunity to test major new functionality before we wrap up our current dev cycle.

If you are an active Universal or DXperience subscriber and would like to test upcoming v19.2 features prior to the official release, you can download the early access preview build from the DevExpress Download Manager and test the features described in this blog post. Let us know how well the new functionality addresses your requirements.

If you are using a trial and want to try this feature today, you can purchase a DevExpress Universal or DXperience license online (this will give you access to the early access preview build). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for preferential upgrade pricing. 

Web Report Designer - In-Place Rich Text Editing

Our XRRichText control allows end-users to edit its content. Double click the control to activate the editor:

Rich Text In-Place Editing


Tell Us What You Think

Please explore the following online demo to learn more about this feature: Web Report Designer - In-Place Rich Text Editing. The Data -> Load File properties panel editor allows you to load your file (HTML, DOCX and RTF) and check how its rendered within the editor (or within the print preview).  

We are eagerly waiting for your feedback, so cast your vote to the survey below:

Web Report Designer - Bind a Report to ObjectDataSource Using the Data Source Wizard

You can use this data source type in the Data Source Wizard to bind a report to a collection of business objects.

Bind a Report to Object Data Source in Web Report Designer

The data source wizard allows you to specify the parameter expression (using the Expression Editor) and pass an existing report parameter to the constructor or a method that returns a collection of business objects:

Specify Object Data Source Parameters

Tell Us What You Think

Please explore the following online demo to learn more about this feature: Web Report Designer - Object Data Source Wizard.

If you’d like to check how the wizard works with your own data access layer, you should:

  • Backup your application and then upgrade it to v19.2;
  • Implement the DevExpress.DataAccess.Web.IObjectDataSourceWizardTypeProvider interface:
  public class ObjectDataSourceWizardTypeProvider : IObjectDataSourceWizardTypeProvider {
        public IEnumerable<Type> GetAvailableTypes(string context) {
                return new [] { typeof(MyBusinessObjectType) };
        }
    }
  • Register your implementation at the application startup:
DefaultReportDesignerContainer.RegisterObjectDataSourceWizardTypeProvider<ObjectDataSourceWizardTypeProvider>();

Web Report Designer - Properties Panel Update

In previous versions, two editors were used for a single property: the first was created to specify a static value and the second to provide an expression. We updated the properties panel to make it more compact and eliminate the confusion related to the use of two editors for a single property:

Properties Panel - Comparison

This enhancement helps bring the Web Report Designer closer to its WinForms counterpart. Previously a square icon could be used to reset a property to its default value. With this update, the icon near each property also indicates whether a property value differs from its default value, and allows you to define an expression as needed. Property editor values that were specified via an expression now display a formula icon to the right of the editor.

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use.This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.
Viewing all 3389 articles
Browse latest View live