Quantcast
Channel: ASP.NET Team Blog
Viewing all 398 articles
Browse latest View live

Blazor UI Components - New Memo Edit, Data Grid, and Scheduler enhancements and more (v20.1.6)

$
0
0

In this post, I'll discuss the most recent enhancements to the DevExpress UI for Blazor (v20.1.6).

.NET Core 3.1.7 and Blazor WebAssembly 3.2.1 Support

v20.1.6 supports the most recent versions of Blazor WebAssembly 3.2.1 and .NET Core 3.1.7. If you have yet to upgrade, please do so as Microsoft has addressed important vulnerabilities.

The update addresses the vulnerability by correcting how the ASP.NET Core web application handles web requests. -Rahul (Microsoft)

All .NET Core 3.1 applications running on .NET Core 3.1.6 or lower are affected by the CVE-2020-1597: ASP.NET Core Denial of Service Vulnerability. To learn more, please review the following: Microsoft Security Advisory CVE-2020-1597 | ASP.NET Core Denial of Service Vulnerability.

New Blazor Memo Editor

This release ships with a new multi-line memo editor component for Blazor:

DevExpress Blazor - Memo Edit

Our Blazor Memo component includes the following features:

  • rows– Use rows to control the number of visible text lines
  • columns– use columns to limit editor width by character count
  • resize – Our memo control supports multiple display modes including: Vertical, Horizontal, VerticalHorizontal, & Disabled
  • Clear button -Use the clear button to remove all content within the memo field.
  • read-only mode

Demo | Documentation

Blazor Data Grid

Popup Edit Form

You can now select between two edit modes when using our Blazor Data Grid: built-in or modal popup edit form. To enable the popup edit form, set the EditMode property to DataGridEditMode.PopupEditForm.

Demo | Documentation

Blazor Scheduler

Appointment Templates

Our Blazor Scheduler now allows you to use templates to specify a custom appearance for individual events/appointments. To declare custom content for all-day appointments, use HorizontalAppointmentTemplate.

<HorizontalAppointmentTemplate><div
    class="card shadow-sm p-1 bg-white text-dark"
    style="width:100%; font-size: .925em; font-weight:600; box-shadow: .125rem .25rem rgba(34,34,34,0.15)">
    @context.Appointment.Subject</div></HorizontalAppointmentTemplate>

For appointments less than one day in duration, use the VerticalAppointmentTemplate:

<VerticalAppointmentTemplate><div
    class="card shadow-sm bg-white p-2"
    style="overflow: hidden; height: 100%;box-shadow: .125rem .25rem rgba(34,34,34,0.15)"><div><span class="badge badge-info mb-1 @context.Status.CssClass">@context.Status.Caption</span></div><span
      class="text-dark pl-0 mb-1"
      style="font-weight:600; font-size: .925em;">@context.Appointment.Subject</span><div
      style="height:100%; display:flex; flex-direction:column; justify-content:flex-end;"><div><span class="badge badge-light"><span class="oi oi-clock pr-1"> </span>@context.Appointment.End.ToString("MMM dd HH:mm")</span></div></div></div></VerticalAppointmentTemplate>

DevExpress Blazor - Scheduler - Appointment Template

Demo | Documentation

Custom Fields

Scheduler elements require a few standard data-bound properties (AppointmentID, Start, End, etc.). With this release, you can now add custom fields to appointments, labels, and status values.

For example, use the AppointmentMappings.CustomFieldMappings collection to add custom fields for appointments:

DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage()
{
  AppointmentsSource = AppointmentCollection.GetAppointments(),
  AppointmentMappings = new DxSchedulerAppointmentMappings()
  {…
    CustomFieldMappings = new List<DxSchedulerCustomFieldMapping> {
      new DxSchedulerCustomFieldMapping { Name = "IsApproved", Mapping = "Approved" },
      new DxSchedulerCustomFieldMapping { Name = "Progress", Mapping = "Progress" }
    }
  }
};

Custom field mapping properties are also available for Labels and Status values.

Documentation

To access custom field values in templates, use the Context.Appointment.CustomFields property:

<VerticalAppointmentTemplate>
    ...
        @if (Convert.ToBoolean(context.Appointment.CustomFields["IsApproved"])) {<p class="text-dark"><span class="oi oi-check"></span> Approved</p>
        }<div class="progress border-primary" style="height: 5px;"><div class="progress-bar bg-success"
                 style="width:@context.Appointment.CustomFields["Progress"]"
                 role="progressbar"></div></div></div></VerticalAppointmentTemplate>

Blazor Scheduler Appointment Custom Fields

New Customization API

With this update, you can now assign CSS classes to customize appointments, labels, and status values:

AppointmentLabelMappings = new DxSchedulerAppointmentLabelMappings() {
    Id = "Id",
    Caption = "LabelName",
    Color = "LabelColor",
    TextCssClass = "TextCssClass",
    BackgroundCssClass = "BackgroundCssClass"
}

Documentation

Blazor Data Editors

Multiple Columns

Our Blazor List Box, ComboBox, and TagBox components can now display data across multiple columns. To create the new column type, use the DxListEditorColumn object and specify the following properties to customize your column

  • FieldName - Binds the column to a specified data source field
  • Width - Specifies the column's width
  • Visible - Specifies the column's visibility
  • VisibleIndex - Specifies the column's display position
<DxComboBox Data=”@DataSource”
                  @bind-Value=”@SelectedValue”
                  EditFormat=”{1} {2}”><DxListEditorColumn FieldName=”Id” Width=”50px” /><DxListEditorColumn FieldName=”FirstName” VisibleIndex=”1”/><DxListEditorColumn FieldName=”LastName” /><DxListEditorColumn FieldName=”Country” Visible=”false” /></DxComboBox>

Our Blazor ComboBox and TagBox components now offer an EditFormat property. Use this property to format values displayed in both standard and multi-column modes. In multi-column mode, you can specify a visible column's index in curly braces. The code above adds three columns to the ComboBox and applies the {1} {2} format to the component's edit values. This format specifies that the editor value includes values for the following columns: FirstName (VisibleIndex = 1) and LastName (VisibleIndex = 2).

Blazor Editors Multiple Column EditFormat

Demo | Documentation

Bind to a Data Object Field

Our ComboBox, TagBox, and List Box components allow you to bind to any IEnumerable data source (database, custom objects, etc.). These components use the TextFieldName property to display item text.

With this release, we've added a new ValueFieldName property for the ComboBox, TagBox, and List Box. Use TextFieldName to display human-readable strings and ValueFieldName to read the connected "non-friendly" values. For example, use TextFieldName to display 'Employee Name' and ValueFieldName to read the corresponding 'Employee ID':

public class Employee
{
    public int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public Department Department { get; set; }

    public string Text => $"{FirstName} {LastName} ({Department} Dept.)";
}

...

<DxComboBox Data="@Employees.DataSource"
            TextFieldName="@nameof(Employee.Text)"
            ValueFieldName="@nameof(Employee.Id)"
            SelectedItemChanged="@((Employee employee) => SelectedItem = employee)"
            @bind-Value="@Value"></DxComboBox>
Note that both Value and ValueFieldName property types should match.

To bind the component to the entire object, do not specify the ValueFieldName property:

<DxComboBox Data="@Employees.DataSource"
            @bind-Value="@Value"></DxComboBox>

This feature implementation required the following API changes.

Input ID

We added a new InputID property to the following components: CheckBox, Date Edit, Spin Edit, Text Box, ComboBox, and TagBox.

Multiple editors can be added to our form layout item's template. You can now use the InputID property to control which editor receives focus when the user clicks on the form layout item's caption.

<DxFormLayout><DxFormLayoutItem Caption="Birth Date:" CaptionFor="date_edit"><Template><DxDateEdit @bind-Date="@BirthDate" InputId="date_edit"></DxDateEdit></Template></DxFormLayoutItem>
    @*...*@</DxFormLayout>

Documentation

Calendar - Bind to a Single Object

Use the new SelectedDate property to bind Calendar to a single DateTime value instead of an IEnumerable collection of dates:

<DxCalendar @bind-SelectedDate="Date" />

@code {
    DateTime Date { get; set; } = new DateTime.Today;
}

Calendar - Date Validation

We added support for Calendar validation. You can now validate the SelectedDate property by adding our Calendar component to Blazor's standard EditForm.

The Calendar is outlined in green if validation is successful and in red if validation fails:

Blazor Calendar Date Validation

Documentation

Calendar - Nullable DateTime Support

You can now bind a Calendar to a nullable DateTime value:

<DxCalendar @bind-SelectedDates="Dates"  EnableMultiSelect="true" />

@code {
    IEnumerable<DateTime?> Dates { get; set; } = new List<DateTime?>() {
        null, new DateTime(2020, 08, 16), new DateTime(2020, 08, 17)
    };
}

Form Layout - CSS Classes

We added a new CssClass property for the Form Layout component. Use it to assign CSS classes to layout items and captions (including tab pages and groups).

Documentation

Enhanced Event Processing

We've improved the delegate type from Action to EventCallback for multiple events. A call to StateHasChanged isn't required with these updated event handlers. StateHasChanged is called automatically to rerender the component after changes in the event.

Before:

<DxButton Click="@Click"../>
@code
{
    void Click(MouseEventArgs args)
    {
      // Use this event to process your code
      // during the click event then call StateHasChanged
      InvokeAsync(StateHasChanged);
    }
}

After:

<DxButton Click="@Click"../>
@code
{
    void Click()
    {
      // Use this event to process your code
      // during the click event without StateHasChanged
    }
}

For a complete list of changes to events and information about EventCallback advantages, please refer to the following Breaking Change: T920147

Upcoming Enhancements

To learn more about our upcoming plans for Blazor (v20.2), please review the following blog post: Blazor Roadmap.


ASP.NET Core, Web Forms and MVC - Early Access Preview (v20.2)

$
0
0

In this post, I’ll summarize some of the features we expect to deliver in our next major update (v20.2). If you are an active DevExpress Universal or DXperience subscriber, you can download and install our Early Access Preview (EAP) to explore the capabilities outlined herein. Once you’ve installed this EAP, please feel free to post your feedback here or on the DevExpress Support Center.

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 important data before installing Early Access and CTP builds.

Perhaps most importantly, this EAP does not include all features/products we expect to ship in our v20.2 release cycle. We are working hard to finalize all v20.2 features/capabilities and once we have more information to share, we’ll post updates on this channel.

ASP.NET Core

DataGrid and TreeList

Export to PDF

v20.2 will include the first version of our PDF Export engine. We researched multiple solutions and decided to build our new client-side PDF Export atop the jsPDF library.

The current version of our PDF Export engine allows end users to export the contents of the ASP.NET Core DataGrid to a PDF document while maintaining UI configurations (sort order, grouping, band layout, summary computation, etc.). Default PDF Export settings replicate the appearance of the DevExtreme Generic theme. If required, you can easily customize the appearance of individual cells or the PDF document itself.

Our PDF Export API allows you to:

  • Customize cell content and appearance
  • Add headers and footers
  • Export custom PDF content
  • Export multiple grids into a single document

To learn more and try our PDF Export demo app, please refer to the discussion page on GitHub.

Editing API Enhancements

We have extended ASP.NET Core DataGrid and TreeList data editing APIs to better support declarative data bindings within React, Vue, and Angular applications. In addition, the following new capabilities will be available in v20.2:

  • Get or set updated/inserted/deleted rows via declarative bindings
  • Save all modified rows in a single request - batch edit mode
  • Cancel changes made to an individual row - batch edit mode
  • Get notified when editing is complete

Please note that these enhancements are not included in this EAP build. We’ve already published our API specification on GitHub and hope to preview the new API in an upcoming pre-release build. Please review our specification and let us know how we can improve our implementation to better serve your needs going forward.

PivotGrid

New Export to Excel API

The ASP.NET Core Pivot Grid will ship with a new Export to Excel API. With this API you can:

  • Customize cell data and appearance
  • Export PivotGird Field Panel configuration data
  • Add additional worksheets with custom data
  • Display PivotGrid export progress/status
  • Protect Excel cells and worksheets with passwords

Please refer to the corresponding discussion page to learn more and share your feedback.

Scheduler

Virtual Scrolling

We’ve enhanced both the performance and usability of the Scheduler for ASP.NET Core. A new Virtual Scrolling mode is available when using the Scheduler’s Day view. If enabled, only visible Scheduler grid cells are rendered.

We are currently working to extend Virtual Scrolling mode to Week and Timeline views. We expect to ship this capability in our final v20.2 release.

Please subscribe to the discussion page for notifications related to Virtual Scrolling.

Recurrence Rule Support

We replaced our custom Recurrence Engine with the RRule open source library (currently used in more than 1800 projects worldwide). As a result, ASP.NET Core Scheduler now supports the iCalendar RFC 2445 specification.

Learn more on this discussion page.

Diagram

Partial Updates

Our Diagram for ASP.NET Core can now partially update its UI in response to external changes in its data source. As you might expect, data editing will no longer require a full reload on data change.

Data Binding Enhancements

Our new nodes.customDataExpr and edges.customDataExpr options allow you to link extra fields (from a data source) to Diagram elements. Linked data is replicated in the Diagram’s change history. As such, the Diagram control can undo/redo changes made to additional data fields. You can also use this new API to replicate custom element data when copying this element.

New Toolbox Configuration Options

We extended the ASP.NET Core Diagram’s Toolbox customization options. You can now specify toolbox width (toolbox.width), set the number of shapes displayed within a toolbox row (toolbox.shapeIconsPerRow), and hide the Toolbox search box (toolbox.showSearch). A new toolboxWidthToHeightRatio property allows you to modify the aspect ratio of toolbox shape items.

 Toolbox Shape Templates

We introduced a new API for shape templates within the toolbox. Use the customShapeToolboxTemplate option to create a common template for all shapes and the toolboxTemplate option to set a template for an individual shape.

Gantt

Context Menu Customization

Our new contextMenu.enabled option allows you to disable/enable the Gantt context menu when appropriate. With the new contextMenu.items option, you can customize Gant context menu items (add, remove and reorder items, customize default item behavior, etc.).

To review the API usage examples and share you feedback, please refer to the following discussion page.

Editing API Enhancements

This release includes new client-side events designed to improve the editing process. Our Gantt for ASP.NET Core invokes these events after a task, a resource or a dependency is modified:

  • startCellEditing and endCellEditing
  • taskInserting , taskDeleting , taskMoving , taskEditDialogShowing , taskUpdating
  • dependencyInserting and dependencyDeleting
  • resourceInserting and resourceDeleting
  • resourceAssigning and resourceUnassigning

Each event argument includes a cancel property (to cancel an action). For instance, you can prevent the display of the default dialog within the taskEditDialogShowing event handler or you can switch edit mode in the startCellEditing event handler. All these event arguments include values and newValues properties so you can access both original and modified object values.

Live examples are available on the corresponding discussion page.

Data Visualization

Annotations in Maps, Pie

We added Data Annotations to Vector Maps and Pie Charts for ASP.NET Core.

You can review supported use cases and our new API here:

Annotations in Pie Chart

Annotations in Vector Map (in progress)

 Axis Label Customization

You can now use templates to render images (or any other custom content) within chart axis labels.

Please, refer to this discussion page to learn more about the new axis label customization API

RichEdit

Spell Checking

RichEdit for ASP.NET Core includes a special API to implement spell checking based on third-party tools. Use the options.spellCheck.enabled property to enable spell checking. The options.spellCheck.checkWordSpelling and options.spellCheck.addWordToDictionary settings should be set to functions that control the word checking process.

Our Rich Text Editor package includes a webpack configuration file so you can build the NSpell bundle with required dictionaries.

Document protection

Our Rich Text Editor for ASP.NET Core can now open/edit protected documents. These documents can include range permissions – wherein editing is restricted to specific sections (for a unique user or user group).

Use the editor’s options.authentication property to authorize the current document user by name or by user group name. Use the options.rangePermissions property to define how permitted ranges are highlighted.

Web Forms and MVC

Gantt

Context Menu Customization

This release includes a client-side PopupMenuShowing event. This event allows you to manage the context menu as needed.

The event argument includes a menuItems property. The property returns a collection of items. You can modify this collection to add and remove items when appropriate. To add a custom item to the context menu, add an ASPxClientGanttPopupMenuItem object type to the menuItems collection.

var customItem = new ASPxClientGanttPopupMenuItem();
customItem.name = “ToggleResources”;
customItem.text = “Toggle Visibility of Resources ”;
customItem.beginGroup = true;
e.menuItems.Add(customItem); 

When a user selects a custom item, our ASP.NET Gantt invokes a client-side CustomCommand event. The event argument’s commandName property returns the name of the clicked item.

function CustomCommand(s, e) {
    switch (e.commandName) {
        case “ToggleResources”:
            // operations
        break; ...
    }
} 

To prevent the ASP.NET Gantt context menu from being displayed, set the event argument’s cancel property to true:

function PopupMenuShowing(s, e) {
e.cancel = true; }

New Client-side API 

This release includes new client-side events designed to improve the editing process. Our WebForms and MVC Gantt control invokes these events after a task, a resource or a dependency is modified:

Each event argument includes the cancel property to cancel the action. For instance, you can prevent the display of the default dialog in the TaskEditDialogShowing event handler or you can switch edit mode in the StartCellEditing event handler. All these event arguments include values and newValues properties so you can access both original and modified object values.

See API Documenation for details.

Diagram

New Toolbox Configuration Options

The number of shapes displayed within a Toolbox row now can be customized via the SettingsToolbox.ShapeIconsPerRow property. You can hide the search box via the SettingsToolbox.ShowSearch property.

<SettingsToolbox Width="500px" ShapeIconsPerRow="5" ShowSearch="False" />

The Diagram’s new ToolboxWidthToHeightRatio property allows you to modify the aspect ratio of toolbox shape items:

<CustomShapes><dx:DiagramCustomShape CategoryName="MyShapes" Type="square" Title="Square"
           BaseType="Rectangle" ToolboxWidthToHeightRatio ="1" DefaultHeight="1" 
           DefaultWidth="1" /></CustomShapes> 

Toolbox Shape Template

We introduced a new API for shape templates in the toolbox. Use the CustomShapeCreateToolboxTemplate event to create a common template for all shapes:

<ClientSideEvents CustomShapeCreateToolboxTemplate="CustomShapeCreateToolboxTemplate" /> 
function CustomShapeCreateToolboxTemplate(s, e) {
    var svgNS = "http://www.w3.org/2000/svg"
    var svgEl = document.createElementNS(svgNS, "svg");
    svgEl.setAttribute("class", "template");
    e.container.appendChild(svgEl);

    var textEl1 = document.createElementNS(svgNS, "text");
    textEl1.setAttribute("class", "template-name");
    textEl1.setAttribute("x", "50%");
    textEl1.setAttribute("y", "40%");
    textEl1.textContent = "New";

    var textEl2 = document.createElementNS(svgNS, "text");
    textEl2.setAttribute("class", "template-name");
    textEl2.setAttribute("x", "50%");
    textEl2.setAttribute("y", "70%");
    textEl2.textContent = "Employee";

    svgEl.appendChild(textEl1);
    svgEl.appendChild(textEl2);
}

The image below illustrates the resulting shape template.

Your Feedback Matters

We realize beta-testing is a time consuming process and we are grateful to those who invest time with our preview builds. Find the current implementation lacking flexibility? Feel we've overlooked a valuable usage scenario? Does our current implementation fail to address your business requirements? Please post your thoughts in the comment section below or create a Support Center ticket. We will happily follow-up and do what we can to extend the capabilities of our new products/features.

ASP.NET WebForms, MVC and Core - Tips & Tricks (July 2020)

$
0
0

We’ve compiled a list of recently updated help topics, code examples and interesting ASP.NET/MVC related support tickets for your review. If you have an ASP.NET WebForms or MVC-related support ticket you’d like to share with the DevExpress developer community, feel free to post a link in the comment section below.

Knowledge Base Articles

The following new article describes use of custom fonts within our Rich Text Editor control:

New Examples

The following examples demonstrate use of our Rich Text Editor in ReactVue and MVC-powered applications:

We also created an example that illustrates use of our client Rich Text Editor for ASP.NET Core within ASP.NET MVC applications:

The following examples address popular MVC GridView-related usage scenarios:

Finally, a Bootstrap Chart control example:

You can find these and other DevExpress examples in our GitHub repository.

Interesting Technical Support Tickets

Common (ASP.NET MVC and Web Forms)

ASP.NET Web Forms

ASP.NET Web Forms Bootstrap

ASP.NET MVC

ASP.NET Core

Documentation Updates

New binding related help topics for the DevExpress ASP.NET Diagram component:

Feedback

As always, we welcome your comments and questions. Submit your feedback below and we’ll be happy to follow-up.

Data Grid for Blazor - Group and Total summary, Column Resize, Fixed Columns, and more (available in v20.2)

$
0
0

As you may know, last week marked the official release of v20.2, our next major update. If you missed the announcement or would like to know more about this release, please refer to the following webpage for more information: "What's New in v20.2".

v20.2 includes several new Blazor UI components. It also includes a series of new features/capabilities for existing DevExpress Blazor UI controls. In this post, I'll focus on the most recent enhancements to our Blazor Data Grid and Blazor Data Editor components. Rest assured, I'll discuss other Blazor enhancements in future posts.

Before I proceed, a quick word about v20.1 and our expired free Blazor UI component offer. If you downloaded v20.1 free-of-charge, you are entitled to use v20.1 as long as you wish. With our v20.2, our Blazor UI controls are no longer available free-of-charge. Should you require additional information on v20.1, please forward your comments to clientservices@devexpress.com.

.NET 5.0 Support

Microsoft should launch .NET 5.0 in November, but you can test .NET 5.0 with our Blazor components today. v20.2.3 supports .NET 5.0 Release Candidate 2.

To learn more about what's new for Blazor in .NET 5, watch this interview with Microsoft PM for Blazor, Dan Roth.

Once .NET 5 ships officially, we’ll update our v20.2 Blazor product line accordingly.

DevExpress Installer

We've made our Blazor components easier to download and install. DevExpress Blazor UI components can now be installed via the DevExpress Unified Installer.

If you own an active ASP.NET/DXperience/Universal Subscription, you can download our Unified Installer here: Download Manager.

While you can still install our Blazor components with NuGet, consider using our Unified Installer if the following is of value to your business:

  • Demos: When you install our Blazor UI components via our Unified Installer, you’ll have access to all DevExpress Blazor demos locally. Full demo source code is also installed so you can load any demo within your local Visual Studio environment.
  • Project Templates: The DevExpress Unified Installer includes our Blazor project templates. If you require project templates, installation via our Unified Installer is the way to go.

DevExpress Blazor Project Templates

Documentation

Blazor Data Grid

Total and Group Summary Computation

Our Blazor Data Grid can compute summaries (using aggregate functions such as SUM, MIN, MAX, etc) for both the entire contents of the grid and each individual group level. "Total" summaries are calculated across all grid records and displayed within the grid’s footer. "Group" summaries are calculated across rows in individual groups and displayed within group rows. If you have questions about this particular capability, please post your question in the comment section below.

DevExpress Blazor Data Grid Group and Total Summary

Blazor Data Grid – How to Create Total or Group Summaries

To create Total or Group summaries, simply add DxDataGridSummaryItem objects to the TotalSummary or GroupSummary collection.

Key DxDataGridSummaryItem properties are summarized below.

  • Field– Specifies the name of the data field whose values are used to calculate the summary.
  • SummaryType– Specifies the aggregate function (SUM, MIN, MAX, AVG, etc) used. – Specifies the appropriate aggregate function (SUM, MIN, MAX, AVG, etc) used.
  • ShowInColumn– Specifies the name of the column used to display the summary.
  • DisplayFormat– Specifies the desired summary display format. The ‘{0}’ placeholder returns the summary value and ‘{1}’ returns the parent column’s caption.

Demo | Documentation

Resize Columns

The DevExpress Blazor Data Grid allows users to resize columns as needed. Users can move the mouse pointer over the right border of a column to display a double-sided arrow. Users can drag column border to change column width.

To enable column resize operations, set the ColumnResizeMode property to one of the following values:

DevExpress Blazor DataGrid - Column Resize

Demo | Documentation

Fixed Columns

Our Blazor Data Grid allows you to anchor columns to its left or rightmost edge. Fixed columns can help improve data readability as columns fixed to the right or left remain visible when users scroll the grid horizontally. To fix a column, set its FixedStyle property to DataGridFixedStyle.Left or DataGridFixedStyle.Right.

DevExpress Blazor DataGrid - Fixed and Frozen Columns

Demo | Documentation

Other Recent Enhancements

In case you missed it, we added the following Data Grid features in a recent minor release:

New Popup Edit Form

End-users can now edit column values within a popup form. To activate Popup Edit Form mode, set the EditMode property to PopupEditForm.

DevExpress Blazor DataGrid - Popup Edit Form

Demo | Documentation

Incremental Filtering

End-users can filter list items dynamically, based upon the text typed into the editor's input box. Filter modes include: Contains and StartsWith.

DevExpress Blazor DataGrid - Incremental Filtering

Documentation

Blazor Data Editors

New Time Editor

This release ships with a new time editor for Blazor:

DevExpress Blazor Time Editor

Our Time Edit component includes the following features:

  • TimeSpan / DateTime binding
  • Integrated drop-down time picker
  • 12 / 24-hour format support
  • Min / max time support
  • Read-only and disabled states
  • Nullable time
  • Clear button

Demo | Documentation

Date Edit - Display Time

The Date Edit component can now display time. Set the TimeSectionVisible property to true to add the time section to the component.

DevExpress Blazor Date Edit Time Section

To format a time value in display and edit modes, use the DisplayFormat and Format properties.

Demo

Should you have any questions about these new features, or if you require assistance on our Blazor product line, please comment below. Please remember, that the features described in this post relate to v20.2. v20.2 is not available free-of-charge. The capabilities described in this post are available to those who own an active ASP.NET/DXperience/Universal Subscription.

Scheduler for Blazor - Resources, Custom Fields, Form Customization (available in v20.2)

$
0
0

Our most recent release (v20.2), includes a series of new features/capabilities for existing DevExpress Blazor UI controls. In this post, I'll focus on the most recent enhancements to our Blazor Scheduler component.

Before I proceed, a quick word about v20.1 and our expired free Blazor UI component offer. If you downloaded v20.1 free-of-charge, you are entitled to use v20.1 as long as you wish. With our v20.2, our Blazor UI controls are no longer available free-of-charge. Should you require additional information on v20.1, please forward your comments to clientservices@devexpress.com.

Resources

Our Blazor Scheduler now allows you to assign resources to appointments and browse multiple schedules simultaneously. You can group appointments by resources or by dates and display resources in different views:

Blazor Scheduler Resources

Demo | Documentation

We've integrated Resource Navigation into our Blazor Scheduler. Your users can show or hide calendars via our integrated Resource Navigator.

Blazor Scheduler Resource Navigation

You can also create a custom UI as needed. For instance, you can introduce a tree-like resource navigator to filter resources:

Blazor Scheduler Resource Navigation Filter

Demo | Documentation

Custom Appointment Form

Our Blazor Scheduler has two built-in dialogs to edit appointments: compact and detailed. We've added a flexible new API to create custom layouts for these Appointment Dialogs. You can customize the forms to do the following:

  • Add your own editors and bind them to custom fields
  • Use custom editors for built-in Appointment items
  • Mix custom content with default items
  • Combine items into groups to better address your business requirements

Use the following new properties to manage these dialogs:

AppointmentCompactFormLayout - Specifies the layout of the compact form that appears when you create an appointment.

Blazor Scheduler Edit Form Customization

AppointmentFormLayout - Specifies the layout of the pop-up form that appears when you create an appointment and click the expand button, or when you edit an appointment.

Blazor Scheduler Custom Edit Form

Demo | Documentation

Appointment Templates

You can now customize appointment appearance via templates. New templates include:

Blazor Scheduler Appointment Templates

Demo | Documentation

Custom Fields

Custom fields allow you to add custom data to appointments, labels, and status fields. For example, use the AppointmentMappings.CustomFieldMappings collection to add custom fields for appointments:

DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
  AppointmentsSource = AppointmentCollection.GetAppointments(),
  AppointmentMappings = new DxSchedulerAppointmentMappings() {
    ...
    CustomFieldMappings = new List<DxSchedulerCustomFieldMapping> {
      new DxSchedulerCustomFieldMapping { Name = "IsAccepted", Mapping = "Accepted" }
    }
  }
};

Demo | Documentation

New API to assign CSS classes

The TextCssClass and BackgroundCssClass properties allow you to assign CSS classes to appointment labels and status fields. You can also map the label's properties to the data source fields:

AppointmentLabelMappings = new DxSchedulerAppointmentLabelMappings()
{
  Id = "Id",
  Caption = "LabelName",
  Color = "LabelColor",
  TextCssClass = "TextCssClass",
  BackgroundCssClass = "BackgroundCssClass"
}

Documentation

Should you have any questions about these new features, or if you require assistance on our Blazor product line, please comment below. Please remember, that the features described in this post relate to v20.2. v20.2 is not available free-of-charge. The capabilities described in this post are available to those who own an active ASP.NET/DXperience/Universal Subscription.

Blazor UI Components - Grid and Stack Layout for Blazor - Responsive Page Layouts (available in v20.2)

$
0
0

As you may already know, v20.2 includes three new Blazor components - 'Grid Layout', 'Stack Layout', and 'Layout Breakpoint'. Use the first two layout components to create custom page layouts as needed. Once complete, use our new Layout Breakpoint component to deliver responsive layouts that adapt to different screen sizes.

Before I proceed, a quick word about v20.1 and our expired free Blazor UI component offer. If you downloaded v20.1 free-of-charge, you are entitled to use v20.1 as long as you wish. With our v20.2, our Blazor UI controls are no longer available free-of-charge. Should you require additional information on v20.1, please forward your comments to clientservices@devexpress.com.

New Blazor Grid Layout

Our new Grid Layout for Blazor allows you to arrange UI elements across a page. The component is based on CSS Grid Layout. To create a layout, simply define rows and columns, specify their size (Height, Width) and distance between them (RowSpacing, ColumnSpacing). Once ready, position layout items such as our Blazor Data Grid or other Blazor component within individual cells. A single item can span multiple rows and columns:

With this new UI element, you can address a variety of use cases. In the following image we use the Grid Layout to create a Dashboard style UI:

Demo | Documentation | GitHub Example

Adaptive Blazor Apps

Use the new LayoutBreakpoint component to create a responsive grid layout.

Demo | Documentation

New Blazor Stack Layout

The new Stack Layout for Blazor allows you to organize UI elements across a one-dimensional stack.

You can stack items using a vertical or horizontal orientation. To specify the item size (auto, pixel, percentage, etc.), use the Length property.

You can also use the LayoutBreakpoint component to adapt a stack layout to different screen sizes.

Demo | Documentation

Layout Breakpoints

The new Blazor Layout Breakpoint component allows you to adapt a page layout to different screen sizes. The new Blazor Layout Breakpoint component allows you to adapt a page layout to different screen sizes. You can use breakpoints to create a responsive Grid Layout and Stack Layout (or apply to any other component as necessary).

You can set up breakpoints in two different ways: either select from predefined sizes (DeviceSize) or set custom limits for width (MinWidth / MaxWidth).

Demo | Documentation | GitHub Example

Should you have any questions about these new features, or if you require assistance on our Blazor product line, please comment below. Please remember, that the features described in this post relate to v20.2. v20.2 is not available free-of-charge. The capabilities described in this post are available to those who own an active ASP.NET/DXperience/Universal Subscription.

Blazor UI Components - Tips & Tricks (October – December 2020)

$
0
0

We hope you are all doing well. Our best wishes to you, your team, and your family this holiday season.

This post includes links to a few interesting Blazor-related support tickets, along with a few help topics and technical videos published over the last three months. We hope you’ll find this info useful as you explore and integrate the DevExpress Blazor UI library within your Blazor app. Should you have any suggestions, feel free to leave a comment below.

Interesting Support Tickets

Updated Help Topics

We extended our Blazor Gettting Started section with the following:

We added new helpful articles: 

  • Two-Way Binding - Explains how to use two-way binding for DevExpress Blazor components.
  • Validate Input - Describes how to use Blazor’s standard EditForm component to validate user input in DevExpress Data Editors, Form Layout, and Data Grid’s edit form.

Support for .NET 5.0

Note that Microsoft updated Blazor browser support in .NET 5.0. Refer to supported browsers and supported frameworks for details.

Troubleshooting

We documented common issues and described solutions in our Troubleshooting section:

New YouTube Videos

Over the last three months, we recorded and published the following new videos:

This playlist includes all videos related to our DevExpress Blazor UI Components.

ASP.NET Tips & Tricks (December 2020)

$
0
0

Here’s this month’s edition of Tips & Tricks for our WebForms/MVC/.NET Core product line. As always, we hope these examples will be of value you as you explore our product line and incorporate our controls in your next ASP.NET project.

First things first – we recently published an article that describes how to use third-party tools with our Rich Text Editor for ASP.NET Core. Specifically, we demonstrate how to add spell checking functionality in v20.2

Rich Text Editor for ASP.NET Core - Spell Checking (Concept)

New Examples

The following new example demonstrates how to edit Diagram data using a separate custom form:

Diagram - How to edit data using a separate form (View on GitHub)

Here are examples of two popular usage scenarios for our Rich Text Editor for ASP.NET Core:

Rich Text Editor for ASP.NET Core - How to load/save documents from/to a database (View on GitHub)

Rich Text Editor for ASP.NET Core - How to submit document content with other values (View on GitHub)

And finally, here are a couple of examples related to our ASP.NET Web Forms Gantt control:

Gantt for Web Forms - A simple example with editing capabilities (View on GitHub)

Gantt for Web Forms - How to implement a custom "Task details" dialog (View on GitHub)

Remember, you can explore all DevExpress ASP.NET examples by navigating to our GitHub repository.

Interesting Technical Support Tickets

Common to All Platorms (ASP.NET MVC and Web Forms)

Grid View - How to restore all Batch Edit modifications on the client if certain rows do not pass server-side validation

ASP.NET Web Forms

Grid View - How to show values for a password column in the Edit Form with the ability to show/hide a password value

Grid View - How to apply the same layout settings to several grids

Splitter - How to make the splitter responsive and expand/collapse its panes automatically based on screen size

ComboBox - How to show a hint for each ComboBox item

ASPxScheduler - How to highlight the headers of TimeLine View scales based on a currently selected interval

ASPxScheduler - How to specify different appearance settings for different TimeLine scales

ASPxScheduler - How to limit the working time interval in a TimeLine View without using custom scales

ASPxScheduler - How to display a custom tooltip for appointment images generated in the InitAppointmentImages event handler

ASPxScheduler - How to automatically invoke the Appointment Dialog for editing a specific appointment

ASP.NET MVC

Grid View for MVC - DateRangePicker Header Filter doesn't evaluate the end-user's local time zone

Grid View for MVC - How to distinguish between Copy and Edit operations when saving data if operations were executed using different FAB items

Grid View for MVC - How to restore visible column indexes after visibility of specific columns was changed using Customization Window

ComboBox for MVC - How to change column caption style

Rich Text Editor for MVC - How to remove the "Ctrl + Click to follow link" text from hyperlink tooltip

Feedback

As always, we welcome your comments and feedback. If you’ve come across a useful Support Center ticket, feel free to share it with the DevExpress developer community here.


Blazor Navigation and Layout - Grid Layout - Named Areas (available in v20.2.4)

$
0
0

As you may already know, v20.2 includes new Blazor UI components that facilitate design of custom page layouts.

Prior to v20.2.4, DevExpress Blazor layout components worked best with static layouts. You could still create a responsive layout (for different screen resolutions) by changing the layout item's position in the grid. Unfortunately this approach required item row and column index recalculation for each screen size.

Our most recent update (v20.2.4) includes a much better option for apps that require responsive layouts. With the introduction of “named areas,” our new DevExpress Blazor Grid Layout API allows you to create responsive layouts with ease. “Named areas” was inspired by the grid template areas property of CSS Grid Layout.

How to use Named Areas

You can now assign area names to layout items and specify the area's placement inside grid rows (via the DxGridLayoutItem.Area and DxGridLayoutRow.Areas properties).

To use this new feature, you should:

  1. Add <Items>...</Items> to the component's markup to define the Items collection.
  2. Add DxGridLayoutItem objects to the collection. Use the Template property to specify item content.
  3. Use the Area property to assign an area name to each layout item.
  4. Use the DxGridLayoutRow.Areas property to place the areas within rows. If you need to leave a grid cell empty, use a period character (.).

Demo | Documentation

Comparison

To see how 'named areas' can help you deliver more responsive web apps, consider the following layouts for large, medium, and small screen sizes:

Large (Desktop)Blazor-Grid-Layout-Named-Areas-Large

Medium (Tablet)Blazor-Grid-Layout-Named-Areas-Medium

Small (Phone)

Let's review the two options available to you when generating these distinct layouts (old vs new approach):

1. Row and Column Indexes

Using row and column indexes requires you to manage the grid layout's row and column count and set different DxGridLayoutItem indexes for screen sizes:

<DxGridLayout><Rows>
    @if(isLargeScreen) {<DxGridLayoutRow Height="508px" /><DxGridLayoutRow />
    }
    @if(isMediumScreen) {<DxGridLayoutRow Height="250px" /><DxGridLayoutRow Height="250px" /><DxGridLayoutRow Height="1fr" />
    }
    @if(isSmallScreen) {<DxGridLayoutRow Height="auto" /><DxGridLayoutRow Height="auto" /><DxGridLayoutRow Height="auto" /><DxGridLayoutRow Height="auto" />
    }</Rows><Columns>
    @if(isLargeScreen) {<DxGridLayoutColumn /><DxGridLayoutColumn /><DxGridLayoutColumn />
    }
    @if(isMediumScreen) {<DxGridLayoutColumn /><DxGridLayoutColumn />
    }
    @if(isSmallScreen) {<DxGridLayoutColumn />
    }</Columns><Items><DxGridLayoutItem Row="0" Column="0" RowSpan="isMediumScreen ? 2 : 1"><Template><SalesDataGrid Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Row="GetRowColIndex(0, 0, 2)" Column="GetRowColIndex(1, 1, 0)"><Template><SalesByCountryChart Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Row="GetRowColIndex(0, 1, 3)" Column="GetRowColIndex(2, 1, 0)"><Template><SalesInUSChart Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Row="GetRowColIndex(1, 2, 1)" Column="0" ColumnSpan="3"><Template><SalesByCityChart Sales="salesData" /></Template></DxGridLayoutItem></Items></DxGridLayout>

@code {
  int GetRowColIndex(int largeIndex, int mediumIndex, int smallIndex) {
    if(isMediumScreen)
      return mediumIndex;
    if(isSmallScreen)
      return smallIndex;
    return largeIndex;
  }
}

2. Named Areas

Take a look at the same example from above using named areas:

<DxGridLayout><Rows>
    @if(isLargeScreen) {<DxGridLayoutRow Areas="salesDataTable salesByCountry salesInUS" Height="508px" /><DxGridLayoutRow Areas="salesByCity salesByCity salesByCity" />
    }
    @if(isMediumScreen) {<DxGridLayoutRow Areas="salesDataTable salesByCountry" Height="250px" /><DxGridLayoutRow Areas="salesDataTable salesInUS" Height="250px" /><DxGridLayoutRow Areas="salesByCity salesByCity" Height="1fr" />
    }
    @if(isSmallScreen) {<DxGridLayoutRow Areas="salesDataTable" Height="auto" /><DxGridLayoutRow Areas="salesByCity" Height="auto" /><DxGridLayoutRow Areas="salesByCountry" Height="auto" /><DxGridLayoutRow Areas="salesInUS" Height="auto" />
    }</Rows><Columns>
    @if(isLargeScreen) {<DxGridLayoutColumn /><DxGridLayoutColumn /><DxGridLayoutColumn />
    }
    @if(isMediumScreen) {<DxGridLayoutColumn /><DxGridLayoutColumn />
    }
    @if(isSmallScreen) {<DxGridLayoutColumn />
    }</Columns><Items><DxGridLayoutItem Area="salesDataTable"><Template><SalesDataGrid Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Area="salesByCountry"><Template><SalesByCountryChart Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Area="salesInUS"><Template><SalesInUSChart Sales="salesData" /></Template></DxGridLayoutItem><DxGridLayoutItem Area="salesByCity"><Template><SalesByCityChart Sales="salesData" /></Template></DxGridLayoutItem></Items></DxGridLayout>

As you can see, the code for 'named areas' is simpler, cleaner, and easier to maintain.

Leave a comment below and let us know how you're using our Blazor Layout components in your web applications. We’d also love to know what you think of this new feature.

Blazor UI Components - New Menu (Available now in v20.2.5)

$
0
0

In this post, I'll discuss our new Menu component available as part of the DevExpress UI for Blazor (v20.2.5).

New Menu

Our Menu for Blazor allows you to add an adaptive menu to your Blazor application. Blazor Menu items are stored in the Items collection. Each item can display an icon, text, or both.

DevExpress Blazor Menu

Orientation

The Menu's default orientation is Horizontal (menu items are side-by-side). Use the Orientation property to change the menu to Vertical (menu items are stacked).

DevExpress Blazor Menu Vertical

Adaptive

The DisplayMode property allows you to optimize component layout based on device type:

  • Desktop – Use this mode for devices with large screens.
  • Mobile – Use this mode for mobile devices.
  • Auto – In this mode, the component adapts to device type automatically.

DevExpress Blazor Menu - Adaptive

The CollapseItemToIconMode, CollapseItemToHamburgerMenu, and AdaptivePriority properties allow you to fine-tune adaptive mode to address specific business needs.

DevExpress Blazor Menu - Adaptive

Templates

Our Blazor Menu component allows you to customize the layout and appearance of menu items and associated elements via templates. You can apply a template to all items or to an individual item. Individual templates override common templates.

DevExpress Blazor Menu - Templates

Feedback

Leave a comment below and let us know how you're using our Blazor Layout components in your web applications.

Blazor UI - 2021 Roadmap

$
0
0

Before I detail our 2021 Roadmap for the DevExpress UI for Blazor, my thanks to everyone who shared feedback/thoughts last year. Your contribution is appreciated.

In this post, I’ll summarize our Blazor UI release plans for 2021. Should you have any questions about the products/features listed herein, feel free to submit your comments/questions below.

The information contained within this blog post details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely on or use this information to help make a purchase decision about Developer Express Inc products.

New Components

DevExpress Office Controls

v21.1

In our first major 2021 update, we plan to release the following DevExpress Office Controls for Blazor:

  • Blazor Rich Text Edit - Advanced text editing/word processing functionality for your next Blazor web app.

  • Blazor Spreadsheet - Excel inspired user experiences/capabilities for your next Blazor web app.

DevExpress Blazor Rich Text Editor

Navigation, Editors, & More

v21.2

We expect to ship the following new components in our second major update in 2021:

  • File Manager - We're creating a new Blazor File Manager component to manage remote file system using standard file management operations.

  • DropDownEdit - The Drop Down Edit component will be able to display custom content within its list.

  • Binary Image - The Binary Column will allow you to display image data. You can bind this column to a property that contains images.

  • Button Edit - Our Button Edit component will display a value in a text box editor and display one or more buttons within its client region.

  • Accordion - The Accordion UI component will allow you to display collapsible content panels when presenting information in a limited amount of space. Use the Accordion component for side navigation and organize items into groups.

  • Sidebar - With our new Sidebar component, you’ll be able to add a sidebar to your app and (located alongside the main display area) display relevant information or navigation options.

  • New Dialogs - We're adding three new dialogs to our Blazor component suite: Confirmation, Alert, and an Error dialog.

Dashboards

Last year, we created a detailed tutorial on how to use our Web Dashboard within your Blazor Apps.

This year, we plan to introduce a native Blazor Dashboard component. This new component will simplify how you add our Web Dashboard control to your Blazor application and bind it to your backend.

Common Enhancements

v21.1

  • Bootstrap 5 Support - Bootstrap 5 should be released in early 2021. Rest assured, our v21.1 Blazor components will support Bootstrap 5.

v21.2

  • Accessibility Support - We expect to fully support WCAG 2.1 and Section 508 accessibility standards within our Blazor product line.

  • New Dark Theme - We will introduce a new dark theme for our Blazor components.

  • Content Security Policy Support - We expect to add support for the Content-Security-Policy header. With it, you'll be able to restrict resources such as JavaScript, CSS, etc (pretty much anything that the browser loads). Refer to the following page for more information: https://content-security-policy.com/

  • Right To Left support - We expect to add right-to-left support to major Blazor components (Data Grid, Scheduler, etc.).

Data Grid

We expect to refine/enhance our Blazor DataGrid throughout 2021. We’ll share more information in this regard as these capabilities come online. Performance and adaptability remain major focus areas. Here are few things you can expect in 2021:

v21.1

  • Criteria Language Syntax Support - We expect to support our Cross-Platform Class Library. With this criteria language, you’ll be able to construct advanced filter expressions.

  • Custom Grouping - You'll be able to group data based on custom criteria as needed.

  • Custom Sorting - This new API will allow you to apply custom conditions for any sort operation.

  • Automatic Model Update - Our new Blazor Grid will allow you to bind to ObservableCollection and implement the INotifyPropertyChanged interface. The Grid will automatically update itself when changes are made to the observable collection.

Editing, Filtering, Adaptivity, & More

v21.2

  • Data Aware (Excel) Export - We expect to introduce data-aware export mode (XLSX format). This mode will allow you to retain data shaping operations (filters, groups, conditional formatting, etc.) during XLSX document generation.

  • PDF Data Export - Users will be able to export the contents of your grid to a PDF file.

  • Inline Edit - Inline Edit mode will allow you to directly edit an individual row without displaying the Grid’s edit form.

  • Search Panel - With the new Search Panel, end users will be able to filter multiple columns simultaneously and find a specific value.

  • Header Filter - End users will be able to filter data by selecting a corresponding item in the Header Filter popup dialog.

  • Binary Image Column - The Binary Image column will allow you to display and export an image bound to a data field with binary data.

  • Adaptivity Support - Our new adaptive mode will display cards rather than rows when viewing the Data Grid on a mobile device.

DevExpress Blazor Data Grid - Mobile Friendly - Adaptive

Data Editors

v21.1

  • Masked Input - Controls with text fields (Blazor Text Box, Blazor ComboBox, etc) will support custom Masks (to help you control/manage user input).

DevExpress Blazor Data Editor - Masked Input

  • ComboBox Drop-down Auto Position

v21.2

  • Item Template in Editors - Our List Box, Tag Box and Combo Box components will include a new template region. You will be able to display custom information within it as necessary (will include support for an image within the input box).

API Enhancements

  • On Demand Data Loading - for our Blazor List Box, Combo Box, and Tag Box. Items that are not currently displayed can be loaded dynamically (based on end-user action). As you would expect, this capability will help improve page load speed.

  • Focus an Editor in Code

  • List Box - The DevExpress Blazor ListBox will allow you to bind a value field to a single data object.

Scheduler

v21.1

  • Timeline - The DevExpress Blazor Scheduler will ship with a new Timeline View. The timeline will display appointments/events as horizontal bars along its timescale. This new UI paradigm will give end-users a clearer picture of upcoming/past events.

  • Month view - A new Month View will allow your end users to view appointments by month. This view will position days one after another horizontally (so that they form weeks, while weeks are placed one under another).

DevExpress Blazor Scheduler

v21.2

  • Adaptivity Enhancements - We expect to improve rendering for mobile browsers.

Charts

v21.1

  • Zooming and Scrolling - We expect to improve zooming and scrolling operations. The Chart control will aggregate data and hide excessive points when you zoom out.

  • Display format in Series Label - Will allow you to assign custom display formats to any series label.

  • Series Label Customization - Will allow you to change the look and feel of a series label or create custom labels.

Reporting

To learn more about the enhancements we’ll make for Blazor Reports, please refer to the following post: DevExpress Reporting - 2021 Roadmap. New 2021 features will include:

  • Export To PDF - Tagged PDF
  • Runtime Report Generation - New Fluent API
  • Report Designer Enhancements

DevExpress Blazor Reporting

Popup Control

v21.1

  • API Enhancements
    • Manage open and close actions
    • Control z-index
    • Set custom display position
    • Assign popup window size

v21.2

  • Non-Modal State Support

  • Multiple Popup Windows

Tabs

v21.1

  • Content Lazy Loading support - This new feature will allow you to specify whether to load tab content immediately or when a tab is activated.

v21.2

  • Adaptivity support
    • Automatic resize based on container size
    • Multiline tab support
    • Improved mobile device support

Menu

v21.1

  • Data Binding Support - You'll be able to populate Menu items from a database.

Your Feedback Matters

Bootstrap ASP.NET Core - .NET Core 3.1 Support

$
0
0

One of our users recently asked us whether we could upgrade our Bootstrap ASP.NET Core controls to support the .NET Core 3.1 framework. The problem was that this control suite is in maintenance mode and has been for a couple of years, but nevertheless, we have decided to do the update.

Because this product was retired, we had removed it from our NuGet server. In this blog post I'll detail how you can upgrade this package via NuGet to support .NET Core 3.1.

NuGet Update

If you added your DevExpress private feed to Visual Studio, open the NuGet Package Manager Console and run the following command:

dotnet add package DevExpress.AspNetCore.Bootstrap -v 18.2.15-pre-21051 -s https://nuget.devexpress.com/{Your secret key}/api

Download NuGet

Alternatively, you can download the attached NuGet package and install it using the following steps:

  1. Create a folder for local NuGet packages on a developer machine. For example:D:\Projects\LocalNuGetFeed\
  2. Unzip the packageBootstrap ASP.NET Core NuGet Packages 18.2.15-pre-21051.zip to the created folder.
  3. Open your application in Visual Studio, then open the NuGet Package Manager window.
  4. Create a local feed (steps #1 and #2), make sure its check box is checked (step #3).
  5. Enable the "Include prereleases" check box (see #4). You'll see the list of available packages to install:
Please note that NuGet marks packages as 'Prerelease' if its version number includes a suffix (e.g., vXX.YY.ZZ-some_suffix). Irrespective of this, our team has tested this package and we consider it an official build.

Should you have any other questions, feel free to contact our support team.

ASP.NET Core, WebForms, & MVC - 2021 Roadmap

$
0
0

Before I describe our 2021 ASP.NET Roadmap, my thanks to everyone who shared feedback and responded to our surveys last year. Your contribution is appreciated.

The following list outlines the features/capabilities we expect to incorporate into our ASP.NET Core, WebForms, and MVC components this year.

ASP.NET Core

DataGrid - Export to PDF

Last year we added a PDF Export feature to our DataGrid for ASP.NET Core (as a CTP). This year, we plan to officially release our PDF Export engine and add the following new features:

  • WISIWYG cell data export
  • Fit-to-page option
  • Multi-page export
  • Long cell text support (wrapping)
  • Built-in export progress indicator
  • Cell, format, and appearance customization for exported values

If you have already tried or plan to try our new PDF Export API and want to share your feedback, please refer to this discussion page.

HTML/Markdown Editor

To introduce Table support, we were forced to forked Quill v2.0 in our v20.2 release cycle. A positive outcome of this fork was IE11 support - something that survey results suggest remains important for a large number of our customers. Originally, IE11 support was dropped by the Quill team in Quill v2.0.

This year, we will incorporate the following new features into our HTML/Markdown Editor:

  • Image upload
  • Extended table support:
    • Manage tables via context menus
    • Add table headers
    • Multiline text within cells
    • Cell-merge operations
    • Customize table/cell appearance

If you are using the latest CTP version of our HTML/Markdown Editor and want to share your RTM requirements, feel free to leave your feedback in the following discussion pages: Upload Images and Table Support.

Scheduler - Horizontal Virtual Scrolling

Virtual Scrolling was first introduced in v20.2 and was made available in vertically grouped day and week views. Virtual Scrolling improved performance when displaying hundreds or even thousands of events/groups. In v21.1 this enhancement will be extended to timelines and horizontally grouped day and week views. We'll post an update in this thread once our implementation is ready for review.

Gantt - API Enhancements and PDF Export

We continue to address requests regarding recently released components such as Gantt and Diagram for ASP.NET Core. Most requests are related to component customization. In 2021, we'll add the following customization capabilities to our Gantt component:

  • Customize task appearance via templates
  • Customize behavior via a new set of events raised when a task or a dependency is added/removed
  • Expand/collapse tasks programmatically
  • Show/hide dependencies via a toolbox item or programmatically
  • Specify initial date range to display
  • Scroll to a specific date programmatically
  • Support sorting by column

Another important and highly requested feature we expect to incorporate is PDF Export.

Diagram – API Enhancements

We expect to ship the following ASP.NET Core Diagram customization features in 2021:

  • Customize item appearance via custom CSS styles
  • Get a shape/connector model from its underlying data item key
  • Iterate through all diagram shapes and connectors
  • Extend diagram item events with new 'onHover' and 'onLeave' events

File Manager – API Enhancements

We will extend the ASP.NET Core File Manager and make it more customizable with the following new APIs:

  • Allow custom HTTP headers in RemoteFileSystemProvider
  • Customize context menu items for individual files/folders
  • Show custom errors on the client side
  • Show/hide Progress Panel and Folder Tree
  • Add events to precisely control file/folder operations (folder creation, file upload, moving files, deleting files, etc.)
  • Wrap long file names in the File Manager's detail view
  • Customize icons in the Folder Tree

Material Design Enhancements

The Google team constantly updates its Material Design Guidelines. We plan to incorporate relevant changes and previously planned Editor Label Animations. If you have any specific requests about Material Theme support in DevExtreme, feel free to let us know via the feedback form below this post.

ASP.NET Web Forms and MVC

Common Enhancements

We expect to optimize many of our ASP.NET Web Forms and MVC components, including our GridView, Scheduler, Rich Text Edit, Spreadsheet, and HtmlEditor. We’ll share specific information in this regard as they become available (once an optimization has been applied, I’ll let you know here on this blog). Please stay tuned.

Gantt - API Enhancements and PDF Export

We continue to address requests regarding recently released components such as Gantt and Diagram. Most requests are related to component customization. In 2021, we'll add the following customization capabilities to our Gantt component:

  • Customize task appearance via templates
  • Customize behavior via a new set of events raised when a task or a dependency is added/removed
  • Show/hide dependencies via a toolbox item or programmatically
  • Specify initial date range to display
  • Scroll to a specific date programmatically
  • Automatically calculate component height

Another important and highly requested feature we expect to incorporate is PDF Export.

Diagram – API Enhancements

We expect to ship the following new Diagram customization features in 2021:

  • Customize item appearance via custom CSS styles
  • Get a shape/connector model from its underlying data item key
  • Iterate through all diagram shapes and connectors
  • Extend diagram item events with new 'onHover' and 'onLeave' events
The information contained within this Roadmap details our current/projected development plans. Please note that this information is being shared for INFORMATIONAL PURPOSES ONLY and does not represent a binding commitment on the part of Developer Express Inc. This roadmap and the features/products listed within it are subject to change. You should not rely or use this information to help make a purchase decision about Developer Express Inc products.

Feedback

If you'd like to share your thoughts with our team, please comment below. If you have not responded to our survey, we encourage you to do so whenever time permits.

We expect to update this page throughout the year, so definitely bookmark this page for future reference.

Blazor UI Enhancements and IDE Productivity (available in v20.2.6)

$
0
0

Hope you are all doing well. I wanted to quickly summarize some of the new features introduced in our most recent minor update (v20.2.6). Please note that our next major update (v21.1) is expected to ship in May. I’ll post an update on all the capabilities we expect to release next month, but if you’d like, feel free to review our Blazor Roadmap for more information today.

Data Grid

Drop-Down Width Modes for Combobox Columns

We've added the DropDownWidthMode property to our Data Grid's combobox column. Use this property to set the width of the combobox column editor’s drop-down list. This editor is displayed within the filter row and edit form. The following three modes are available:

  • ContentOrEditorWidth (Default) - Item text is fully displayed. Minimum list width matches the editor.
  • ContentWidth - List width equals the width of the longest list item.
  • EditorWidth - List width matches the editor. List items are truncated if they do not fit.

Fixed Memory Issues

We have also addressed a few critical issues related to memory leaks. These fixes address issues related to data refresh and component dispose.

Scheduler

New API to Track StartDate Changes

The StartDate property now supports two-way binding to the data field. A new StartDateChanged event allows you to track StartDate property changes and perform any necessary custom actions.

Common Settings for Recurrent Appointments

We added a new DxSchedulerRecurrenceSettings class that allows you to specify common values for appointment recurrence properties. You can specify an instance of this class with your own configuration to the new RecurrenceSettings property of the Scheduler Data Storage.

Chart

Grid Lines

A new DxChartAxisGridLines.Visible property allows you to display or hide grid lines (per axis). By default, our Blazor Chart displays grid lines for the value axis but hides them for the argument axis. To change grid line visibility for an axis, add the DxChartAxisGridLines component and set the Visibility property.

The code below demonstrates how to display both horizontal and vertical Chart grid lines:

<DxChartArgumentAxis><DxChartAxisGridLines Visible="true" /></DxChartArgumentAxis><DxChartValueAxis><DxChartAxisGridLines Visible="true" /></DxChartValueAxis>

blazor-chart-axis-grid-lines

Tooltip Position

You can display the DxChartTooltip component inside or outside a series using our new Position property:

blazor-chart-tooltip-position

Data Editors

HTML Events

DevExpress Blazor Editors ship with a comprehensive API (properties, methods, and events) to help you configure and customize our components. For more information, refer to the component’s description.

If the included API does not meet your requirements, rest assured, you can use standard HTML attributes and event handlers to further configure our Blazor components. HTML event handlers are automatically assigned to the component’s input element. This ensures that events such as onblur or onfocus work seamlessly with our components:

<DxTextBox @onblur="OnBlur" />
@code {
  void OnBlur() {
    //…
  }
}

For a complete list of data editors and supported event handlers, refer to the following help topic: HTML Attributes and Events.

IDE Productivity Tool

CodeRush for Visual Studio and Visual Studio Code now ships with templates to help you to quickly create popular DevExpress components for Blazor:

CodeRush-Blazor-expand-data-grid

For more information, refer to the following help topic: Templates for DevExpress Components.

A New Blazor Grid Control (Preview) is Available in v21.1

$
0
0

If you install v21.1 or visit our website after official release, you will notice a second Blazor Grid component in our product lineup (available as a CTP). In this blog post, we'll explain why we introduced a new Grid control, what "CTP" means, and what you can expect in the future from both controls.

DevExpress Blazor Data Grid

Why We Decided to Develop a New Blazor Grid Component

Simply said, we ran into major limitations with our current Blazor Data Grid, DXDataGrid.

Our new Blazor Grid control, DXGrid, will allow us to deliver the features you have been waiting for: improved editing, grouping, and more.

Of course, we would have preferred to simply modify our current grid but unfortunately, this was not an option. We quickly discovered that rewriting the core created its own set of issues. Bottom line - the better choice was to leave the current control in a stable state and introduce a migration path to the new component for those interested in our new Grid.

Rest assured, while this is a new native Blazor Grid component, under the hood, it uses our proven .NET Core Data libraries. The same libraries we use with our many other .NET Core Grids.

We are confident that our new Blazor Grid will bring you the features and performance that you've come to expect from DevExpress Data Grids.

"CTP" and Feature Parity with our Existing Control

Our new Blazor Grid control is available as a Preview (CTP) in v21.1. This simply means that the control is not yet ready to fully replace the existing control – it still lacks a few features. Here's how the controls currently compare:

Features / CapabilitiesNew Control (Preview)Existing Control
Paging
Sorting by value
Grouping
Custom data source support
Cell, Column Header and Grid Footer templates
Unbound columns
Total summary
Group summary
 
YesYes
Features / CapabilitiesNew Control (Preview)Existing Control
Custom display text
Sorting by display text
Custom total summary
Custom sorting
Interval grouping
Group row template
 
YesNo
Features / CapabilitiesNew Control (Preview)Existing Control
Command Column
Edit Form editing
Filter Row
Scrolling
Row Selection
Master-detail
Column resize
Column Chooser
Toolbar
 
NoYes

When Should You Switch to the New Control?

If the current feature list suits your requirements, you can switch now. We expect both controls to be stable and advise you to make your decision based on our published feature set.

We plan to add the following features to the new control in upcoming v21.1 minor updates:

We also expect to officially launch the product in our v21.2 release cycle. Our hope is to add the following features by our v21.2 release:

  • Scrolling
  • Master-detail support

It's hard to predict the date for complete feature parity, but right now we estimate this to be the v22.1 release.

How to Switch

You can use the new control's demos and documentation to learn about its capabilities and related API. If you need assistance, feel free to contact our support team. We're happy to help.

Our team is working on a detailed migration guide document that will help with the transition process. We expect to make it available in upcoming minor updates.

Our Plans for the Original Blazor Data Grid

Going forward, we will focus the majority of our efforts on the new control, but we will continue to support and maintain our original Grid control. Here are a few features we expect to incorporate in our original grid over the next few months:

  • Support "Display" data annotation attribute in data columns
  • Implement Header Text template for columns
  • Implement a confirmation dialog for delete operations
  • Add CssClass, HeaderTextAlignment properties to a column
  • Add API that customizes a column's default editor
  • Add API settings to customize Popup Edit Form and control its behavior
  • Add a Show method to display the Column Chooser next to any UI element

We estimate that the transition period will take about a year, so our original grid will remain in our distribution until v22.1 or v22.2.

Let Us Know If You Have Any Questions

Please contact our Support team or leave a comment below if you have any questions about this transition.


Blazor UI Components - Masked Input (available in v21.1)

$
0
0

Our most recent release (v21.1) includes a new Masked Input data editor. As you might expect, this new Blazor UI element allows you to control data input and force users to enter data values that conform to specific standards. Our Masked Input supports the following mask types.

Text Mask

The text mask type allows users to enter alphabetic, numeric, or alphanumeric characters at specific positions. This mask can be used for things such as phone numbers, zip codes, and social security numbers.

You can use a DxTextMaskProperties component inside the Masked Input's markup to specify additional settings for this mask type:

  • Placeholder - The character used as a placeholder in a masked editor.
  • SaveLiteral - Specified whether Masked Input should include literals for an editor’s value.
<DxMaskedInput @bind-Value="@Phone" Mask="(999)000-0000"><DxTextMaskProperties Placeholder="@('\*')" SaveLiterals=false /></DxMaskedInput>

Numeric Mask

The Numeric Mask mask type allows users to enter numeric values (integers, float, currency, percentage, etc.). This mask type supports the standard numeric .NET format.

<DxMaskedInput @bind-Value="@Price" Mask="C" />

Date Time Mask

The Date Time Mask type allows users to enter a date and/or time values using the standard .NET date and time format. You can use DxDateTimeMaskProperties to define caret behavior via the CaretMode property:

<DxMaskedInput @bind-Value="@Date" Mask="d"><DxDateTimeMaskProperties CaretMode="MaskCaretMode.Advanced" /></DxMaskedInput>

Regular Expression and Custom Mask

Regular Expression and Custom Mask types allow you to specify a custom text pattern. The syntax is similar to the POSIX ERE specification.

Use DxRegExMaskProperties component to specify the following settings:

<DxMaskedInput @bind-Value="@Email" MaskMode="MaskMode.RegEx"
 Mask="(\w|[.-])+@(\w|-)+\.(\w|-){2,4}"><DxRegExMaskProperties PlaceholdersVisible=false /></DxMaskedInput>

Note: You can use the Culture to specify culture settings used by masks. This property is applied for all mask types.

<DxMaskedInput @bind-Value="@Price" Mask="C"><DxNumericMaskProperties Culture="@CultureInfo.GetCultureInfo("en-US")" /></DxMaskedInput>

Additionally, like other DevExpress Blazor Data Editors, Masked Input ships with the following core functionality:

  • Display format - Use the DisplayFormat property to format the display value when the editor is not focused.
  • Prompt text - Use the NullText property to specify the text editor’s placeholder text when the editor’s value is null.
  • Clear button - Use the ClearButtonDisplayMode property to display a Clear button with the control (Clear removes all content within the Masked Input).
  • Read-only and disabled modes.

Blazor Scheduler - New Timeline and Month Views, Operation Restrictions, and more (available in v21.1)

$
0
0

Our most recent major update - v21.1 – includes a series of new features and enhancements for the DevExpress Blazor Scheduler control.

Timeline View

The timeline displays appointments as horizontal bars along with one or multiple timescales. This calendar view offers end-users a clear and concise picture of upcoming/past events:

DevExpress Blazor Scheduler - Timeline View

DemoDocumentation

Month View

The Month View allows end-users to view all events within a given month. You can also configure the Month View to display multiple months simultaneously (with the MonthCount property):

DevExpress Blazor Scheduler - Month View

DemoDocumentation

Appointment Tooltip Template

Our Blazor Scheduler’s Appointment Tooltip can be used to display summary information for an appointment or change its properties. In previous versions of this control, you could not modify tooltip content. In v21.1., you can specify custom content for the tooltip via the AppointmentTooltipTemplate. To access appointment properties, simply use the SchedulerAppointmentTooltipInfo object.

DevExpress Blazor Scheduler - Appointment Tooltip Template

DemoDocumentation

Operation Restrictions

Our Blazor Scheduler and Calendar control can now restrict end-user operations as necessary. For example, you can create a read only calendar view for specific user groups and give other the ability to edit, create and delete appointments. Our new API allows you to implement these usage scenarios with relative ease. Use the AllowCreateAppointment, AllowEditAppointment, and AllowDeleteAppointment properties to configure desired behaviors.

DevExpress Blazor Scheduler - Operation Restrictions

DemoDocumentation

API Enhancements

We also implemented a number of enhancements to our API – they include:

What's Next

We are currently working to deliver a fully adaptive control so as to improve the mobile user experience. We’ll have more to share in this regard in the coming months. And, of course, we are planning to further extend our API and make the control even more flexible.

Should you have any questions or comments on these features, feel free to submit your feedback below.

Blazor Charts - Zoom and Pan, Aggregation and Summaries, Custom Label Format, and more (available in v21.1)

$
0
0

As you may already know, our most recent release (v21.1) includes a number of enhancements for the DevExpress Blazor Chart component. In this post I’ll summarize these new features and briefly describe their use.

Zoom and Pan

The DevExpress Blazor Chart component now supports zoom and scroll operations for the following XY (Cartesian) series views: bars, lines, areas, financial, range bar, and range area.

To enable zoom/scroll, add the DxChartZoomAndPanSettings component to the chart and set the ArgumentAxisZoomAndPanMode and ValueAxisZoomAndPanMode properties.

To add a scrollbar, use the DxChartScrollBarSettings component. The ArgumentAxisScrollBarPosition property allows you to specify the scrollbar position.

<DxChart ...><DxChartZoomAndPanSettings ArgumentAxisZoomAndPanMode="ChartAxisZoomAndPanMode.Both"
    ValueAxisZoomAndPanMode="ChartAxisZoomAndPanMode.None" /><DxChartScrollBarSettings ArgumentAxisScrollBarPosition="ChartScrollBarPosition.Top"
    ArgumentAxisScrollBarVisible="true" />
    ...</DxChart>

blazor-chart-zoom-and-pan

Aggregation and Summaries

Our Blazor Chart component now supports data aggregation - as such, you can now decrease the number of visible points and optimize chart performance. You can use different aggregate methods to group chart data.

Data aggregation is available for the X-axis. The chart splits the X-axis into intervals, aggregates data for each interval and displays values as series points. When users zoom the chart, it automatically re-aggregates data.

You can adjust aggregation settings by adding the DxChartAggregationSettings component to the series component:

<DxChart ...><DxChartLineSeries ... ><DxChartAggregationSettings Enabled="true" Method="AggregationMethod.Average"/></DxChartLineSeries>
  ...</DxChart>

blazor-chart-summaries

If you only need to group data (without the automatic re-aggregation on zoom operations), use the SummaryMethod property instead.

Axis Range

You can now specify visual ranges for both argument and value axes. Use the StartValue and EndValue properties as requirements dictate.

Customize Margins

With v21.1, you can specify whether to add margins between outermost series points and chart boundaries. Use the SideMarginsEnabled and EndOnTick properties to control this behavior. If you set both these properties to false, maximum and minimum series points fall onto the axis lines.

<DxChart ... /><DxChartArgumentAxis EndOnTick="false" SideMarginsEnabled="false"></DxChartArgumentAxis><DxChartValueAxis EndOnTick="false" SideMarginsEnabled="false"></DxChartValueAxis>
  ...</DxChart>

blazor-chart-customize-margins

Size Settings

You can now customize Chart size using the Height and Width properties. You can use absolute or relative units. If you specify a relative height/width, the final render will be based on parent container options. You can also specify a floating-point value which will be automatically converted to a pixel value.

Axis and Series Label Format

You can specify the display format used for axis and series labels. Use the Format property for axis or series as requirements dictate. The ChartElementFormat class contains properties for date-time formats and methods for numeric formats. You can also define a custom format based on the LDML standard.

<DxChartSeriesLabel Visible="true"
  Format='ChartElementFormat.FromLdmlString("\"Value: \" #0.00$;\"Value: \"-#0.00$")' /><DxChartSeriesLabel Visible="true" Format='ChartElementFormat.FixedPoint(3)' />

It's also possible to use a custom format string and specify precision for numeric formats.

<DxChartAxisLabel Format='ChartElementFormat.FromLdmlString("dd.MM.yyyy h:m")' /><DxChartAxisLabel Format='ChartElementFormat.Exponential(3)' />

Disable Animation

You can now disable the animation effect for Chart series when the Chart component is initially rendered. Set the DxChartAnimationSettings.Enabled property to false.

<DxChart ...><DxChartAnimationSettings Enabled="false"/></DxChart>

Popup for Blazor - Appearance Customization, Multiple Windows, Custom Size and Alignment, and more (v21.1)

$
0
0

As you may know, our Blazor Popup component allows you to display a modal window within a Blazor application. A modal popup allows you to direct user action or display relevant content/information. Our most recent release (v21.1) introduces a series of new features/enhancements to our modal Blazor Popup component.

Header, Body, and Footer Customization

The DevExpress Blazor Popup component offers extended customization options for individual UI elements (header, body, and footer).

Documentation | Demo

<div @onclick="@(() => PopupVisible = true)"><p>CLICK TO SHOW A POP-UP WINDOW</p></div><DxPopup @bind-Visible="@PopupVisible"
  HeaderText="Header"
  BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet
    metus vel nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus,
    accumsan orci auctor, imperdiet mauris. Fusce id purus magna."
  ShowFooter="true"><FooterContentTemplate><DxButton RenderStyle="ButtonRenderStyle.Primary" Text="OK"
      Click="@context.CloseCallback" /></FooterContentTemplate></DxPopup>

@code {
  bool PopupVisible { get; set; } = false;
}

Alignment

Our Blazor Popup is now centered both horizontally and vertically on-screen. This helps enhance the user experience on both desktop and mobile devices. You can use the new HorizontalAlignment and VerticalAlignment properties to modify the Popup position as requirements dictate.

Documentation | Demo

<DxPopup ...
  HorizontalAlignment="HorizontalAlignment.Right"
  VerticalAlignment="VerticalAlignment.Bottom" />

Size

Our Blazor Popup's new Width and Height properties allow you to manually specify Popup size in absolute or relative units. You can also force the popup to adapt its width/height adapt to Popup content (set to auto ). Use our new MinHeight, MaxHeight, MinWidth, and MaxWidth properties to explicitly define a Popup's size constraints.

Documentation | Demo

<DxPopup ...
  Width="auto"
  MinWidth="300px"
  MaxWidth="600px" />

Show and Close Actions

Like in previous versions, you can implement two-way binding for the Visible property (to display and close the Popup). The property value is updated when a user closes the Popup.

<div @onclick="@(() => PopupVisible = true)"><p>CLICK TO SHOW A POP-UP WINDOW</p></div><DxPopup @bind-Visible="@PopupVisible"></DxPopup>

@code {
  bool PopupVisible { get; set; } = false;
}

Use our new ShowAsync and CloseAsync methods to display and close the Popup asynchronously. Additionally, users can now press Escape or click outside the Popup's boundaries to close it (CloseOnEscape and CloseOnOutsideClick options).

Documentation | Demo

Respond to Show and Close Actions

In v21.1, we implemented the following new events for our Blazor Popup:

  • Showing - Fires before the Popup is displayed and allows you to cancel this action.
  • Shown - Fires after the Popup is displayed.
  • Closing - Fires before the Popup is closed and allows you to cancel this action.
  • Closed - Fires after the Popup is closed.

Documentation | Demo

Multiple Popups

You can now display multiple Blazor Popups simultaneously. Popup Z-indices are updated automatically based on display order. You can also use the new ZIndex property to specify a Popup's Z-index manually.

Documentation | Demo

Rendering

In v21.1, our Blazor Popup changed its position in the DOM tree - it now renders directly in the document body. Previously, the Popup was rendered in the DOM tree at the position specified in code. Please consider this rendering change when you apply CSS selectors to the Popup.

More information

Blazor Rich Text Editor for Word, RTF, and Text document editing (available in v21.1)

$
0
0

As you may already know, our most recent Blazor release (v21.1) ships with a new Rich Text Editor component for Blazor (available as a Community Tech Preview - CTP). Much like its ASP.NET MVC counterpart, this new Blazor component supports popular document formats (DOCX, RTF, TXT) and allows you to incorporate a Microsoft Word-inspired user experience within your Blazor Server applications.

Preview Release

At present, our Rich Text Editor CTP supports Blazor Server applications and includes the following built-in features:

  • A Microsoft Word-inspired Text Editor user (including a Ribbon)
  • API to create, open, and save documents (DOCX, RTF, and TXT)
  • Content Formatting: Character Formatting, Paragraph Formatting, Floating Objects (images and text boxes)
  • Content Layout Customization: Document Sections, Multi-column Layouts, Headers, and Footers
  • Document Printing
  • Simple View (Web Layout) Mode

DevExpress Blazor Rich Text Editor

Demo

Character and Paragraph Formatting

The DevExpress Rich Text Editor for Blazor ships with the following text formatting features:

  • font settings (select font name, font size)
  • character style (bold, italics, underlined)
  • background and foreground color

End-users can easily modify entire paragraphs using the control's integrated UI formatting options: paragraph alignment, spacing and indentation, bullets, and numbering.

Additionally, the editor includes built-in UI to edit the document's header/footer and insert a Table of Contents.

Document Management and Document API

Our new Blazor Rich Text control supports asynchronous data binding and allows you to programmatically load document content as needs dictate. Use the DocumentContent property to specify the server-side variable used to store document content you need to load.

<DxRichEdit Id="richEdit" DocumentContent="@documentContent" CssClass="w-100 ch-480" />

@code {
  byte[] documentContent;
  protected override async Task OnInitializedAsync() {
    documentContent = await File.ReadAllBytesAsync(Path.Combine(AppContext.BaseDirectory, "Data\\Documents\\Example.docx"));

    await base.OnInitializedAsync();
  }
}

Our Rich Text Editor for Blazor also includes a special Document API to modify an open document programmatically. Use the DocumentAPI property to dynamically access the document content.

Demo

Floating Objects

The DevExpress Rich Text Editor for Blazor allows your end users to insert text boxes and images of popular formats (JPEG, PNG, and GIF) into a document. Users can create, move, resize, and rotate floating objects.

These floating objects, text boxes and images, can be anchored within a document in one of two ways: either inline (the object is displayed within the text) or floating. Floating means the object is strictly positioned, absolutely or relatively within the document, regardless of text flow. Of course, users can still freely position and scale floating objects using the control's UI.

DevExpress Blazor Rich Text Editor - Floating Objects

Fields

In our Rich Text Editor for Blazor, document fields are special placeholders for non-static data that might change (for instance, a page number or date and time). These placeholders are replaced with actual data when the document is rendered for display or print. Standard fields include DATE, TIME, PAGE, NUMPAGES, TOC, and more.

To store custom (non-standard) information in your document, use the DOCVARIABLE field code. This field allows you to insert the required content programmatically by using the CalculateDocumentVariable event.

Printing

We've added support for WYSIWYG printing to generate a printout that closely mirrors the control's screen layout. When a user clicks the Print ribbon item, the editor will open a new browser tab, render the current document, then call the browser's print dialog.

Simple View

The Simple View mode allows you to display document content without page layout elements (margins, headers, or footers). This view can be useful when you need to display your document on a limited-width page.

You can enable this mode in two ways:

  1. Use the Editor's Ribbon UI (click the Simple View command)
  2. Set the ViewType property to Simple

DevExpress Blazor Rich Text Editor - Simple View

Demo

Feedback

As always, we appreciate your feedback. If you have questions on our Blazor RTF control, please post your comment below or submit a support ticket via the DevExpress Support Center.

Viewing all 398 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>