Quick Steps

Use any of the three approaches described below to start developing with DevExpress Bootstrap controls for ASP.NET Core. If you are starting a new project, the recommendation is that you use the Visual Studio template or boilerplate project. The reason is simple: they contain all the required references for dependencies and DevExpress packages. In doing so, you can skip the sections of this tutorial that describe how to do this manually.

Creating a new application in Visual Studio

If you have the DevExpress .NET Components Suite installed on your local Windows machine, you can create a new application using the Visual Studio template available through the Visual Studio New Project dialog. In this dialog, select the DevExpress Template Gallery and click OK. Next, select the ASP.NET Core Bootstrap project template in the invoked Template Gallery.

Starting with the boilerplate project

You can create your application on any platform using the DevExpress starter project available on GitHub: This project already has all the required references and contains sample pages demonstrating common practices. You can remove these pages from the project as described in the included README file.

Starting from scratch or integrating in an existing project

You can manually configure any ASP.NET Core application to work with DevExpress Bootstrap controls using the two steps below.

  1. Add the NuGet package reference to your application. For details, refer to the Install DevExpress Packages section.
  2. Modify project files to integrate all required resources into your application. Details are described in the Add Dependencies section.

Install DevExpress Packages

In Visual Studio

To register the feed using Visual Studio, use the NuGet Package Manager’s Options dialog. To learn more, refer to the DevExpress NuGet packages Knowledge Base article.

Install the DevExpress.AspNetCore.Bootstrap package into your project using the NuGet Project Manager.

Cross-Platform Projects

For cross-platform projects developed with other IDEs, including Visual Studio Code, register the feed by editing the global or project-specific NuGet.config file.

Run the following command in the console:

dotnet add package DevExpress.AspNetCore.Bootstrap -s{feed-authorization-key}/api

You can obtain your personal feed authorization key from

Add Dependencies

1. Modify Startup.cs

The comments in the code below indicate which lines you’ll need to add to the file.

// add a using statement for cleaner code
using DevExpress.AspNetCore;

public void ConfigureServices(IServiceCollection services) {
    // set up the services utilized by DevExpress controls

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) {
    // register DevExpress middleware components before calling UseMvc()
    app.UseMvc(routes => {
            name: "default",
            template: "{controller=Home}/{action=Index}");

You can set up additional options (like the Bootstrap version or icons library) via the Bootstrap method (available through the overloaded AddDevExpressControls method parameter)

services.AddDevExpressControls(options => {
    options.Bootstrap(bootstrap => {
        bootstrap.Mode = BootstrapMode.Bootstrap3;

Chart controls have additional dependencies including JQuery, Globalize, and DevExtreme. To resolve these dependencies automatically, set up the Resources property (available through the overloaded AddDevExpressControls method parameter). This property specifies which static resources should be automatically attached to all the application’s pages.

services.AddDevExpressControls(options => {
     options.Resources = ResourcesType.DevExtreme | ResourcesType.ThirdParty;

The Resources property accepts the following flags:

If required, you can use the DevExtreme flag separately from the ThirdParty flag and manually register the third-party libraries. However, it is not possible to use the ThirdParty flag separately because it would make it impossible to register the DevExtreme resources manually.

If the ThirdParty flag is switched off, you can register the required resources manually as shown below (the order in which the resources are registered is important):

<script src="" integrity="sha256-F0O1TmEa4I8N24nY0bya59eP6svWcshqX1uzwaWC4F4="crossorigin="anonymous"></script>
<script src="" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>

Note that the CLDR library’s resources are automatically attached based on the current culture regardless if the ResourcesType.ThirdParty flag is used.

2. Modify _ViewImports.cshtml

Add a namespace reference as follows:

@using DevExpress.AspNetCore
3. Modify _Layout.cshtml

The comments in code below indicate which lines you’ll need to add to the file.

      @* required META declarations *@
      <meta charset="utf-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
      <title>DevExpress Bootstrap Controls for ASP.NET Core</title>
      @* reference Bootstrap – see Bootstrap docs for version-specific line of code *@
      <link rel="stylesheet" href="~/lib/bootstrap/dist/bootstrap.min.css" />
      @* automatically render style references required by DevExpress *@
      @* add a jQuery reference *@
      <script src="~/lib/jquery/dist/jquery.js"></script>
      @* automatically render script references required by DevExpress *@

Render DevExpress Controls

The following sample code shows how you can render DevExpress ASP.NET Core Bootstrap controls now that you’ve prepared your project:

    .Groups(groups => {
            .Items(items => {
                    .IconCssClass("fa fa-user");
                    .IconCssClass("fa fa-tasks");
         .Items(items => {
                 .IconCssClass("fa fa-dashboard");
                 .IconCssClass("fa fa-percent");

Configure Controls for AJAX in Razor Pages

Follow the steps below to configure AJAX controls within Razor Pages:

  1. Add an AJAX control to Razor Page by puting the control into a page markup as follows:
  2. Configure the control routing.
        .Routes(routes => {
            routes.MapRoute(route => {
                route.RouteValues(new { handler = "MyGridViewHandler" })
  3. Add a custom handler method for AJAX-requests. The method name must start with the "OnPost" prefix + the routing method's paramter ("MyGridViewHandler" in the example above):
    public IActionResult OnPostMyGridViewHandler() {    
        GridData = GetGridData(); // Get data for the grid from a data context.
        var grid = DevExpress.GridView(this, "myGridView");
        return grid.GetActionResult();
  4. Locate AJAX DevExpress Controls inside an HTML form element or add an antiforgery token manually to the page using an HTML @Html.AntiForgeryToken helper as follows:
        .Routes(routes => {
            routes.MapRoute(route => {
                route.RouteValues(new { handler = "MyGridViewHandler" })

Configure Controls for AJAX in ASP.NET Core MVC Views

A few of our controls use AJAX for client-server communication. For example, the client Grid View control initiates an AJAX request every time an end user edits data, navigates between pages or performs a data shaping operation. Follow the steps below to configure an AJAX control.

  1. Create a separate partial view.
  2. Add a default AJAX processing action method to the controller to process AJAX requests from the control. This action should return the created partial view:
    public ActionResult MyGridViewAction() {
        return PartialView("MyViewName", Model);
  3. Add the control’s Razor code to the created partial view. Specify AJAX requests route mapping for the new action method:
        .RouteValues(routes => {
            routes.MapRoute(r => r.Action("MyGridViewAction"))

Customize a control’s appearance

Each control in the suite has a CssClasses() method that provides access to the control’s style settings. The Razor code sample below demonstrates how you can use this method to assign a CSS class to a Bootstrap Button.

    .CssClasses(css => css.Control("my-button"))
    .Text("My Button")

Style declaration:

.my-button {
    border-radius: 0;
Button Custom Appearance

Create Adaptive Layouts

The DevExpress Bootstrap Controls seamlessly integrate with layout features provided by the Bootstrap framework. To construct adaptive web applications, make sure to use page layouts based on the Bootstrap grid system

<div class="container">
  <div class="row">
    <div class="col">
    <div class="col-sm-8">

Use Bootstrap Themes

DevExpress Bootstrap controls are natively rendered using Bootstrap framework components. No configuration is required to apply an external Bootstrap theme.

In page markup, replace the link to the default bootstrap.css file with the link to the themed bootstrap.css file (which is delivered with any bootstrap theme) and the custom theme will be applied to all controls on the page.

Change Icons

DevExpress Bootstrap controls use icon fonts to display icons within their visual elements. The default Embedded icon set can be replaced with FontAwesome or Glyphicons Halflings set (the latter included by default into the Bootstrap 3 package). You can also replace each individual icon with a custom one in CSS.

Embedded Icons

Glyphicons Icons

Font Awesome Icons

To switch icon sets, use the iconSet property available in the services.AddDevExpressControls() options parameter. For example, the following code enables FontAwesome icons:

services.AddDevExpressControls(options => {
  options.Bootstrap(bootstrap => {
    bootstrap.IconSet = BootstrapIconSet.FontAwesome;

Note that you would need to download FontAwesome icons separately, then add the font and CSS files to your project and link the FontAwesome CSS to your master page:

<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />

Localize Controls

DevExpress controls support 5 languages – English, German, Spanish, Japanese and Russian. To localize the controls, download the corresponding localization package (for example, and modify the Startup.cs as shown below:

public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
    // The localization middleware must be configured before any middleware that may check the request culture. 
    app.UseRequestLocalization(new RequestLocalizationOptions {
        DefaultRequestCulture = new RequestCulture(culture: "de-DE", uiCulture: "de-DE"),
        SupportedUICultures = new List<CultureInfo> { new CultureInfo("en-US"), new CultureInfo("de-DE") 

Note that specifying the SupportedUICultures property is mandatory – this is the list of cultures your application supports. The culture specified using the DefaultRequestCulture property is used as a fallback culture when no other culture is requested, or the requested culture does not exist.

Refer to the Globalization and localization in ASP.NET Core topic in Microsoft documentation for more information.

Screen Size
Color Themes
Demo QR Code