Create a Solution with the DevExpress Grid Component in Visual Studio for Mac

  • 2 minutes to read

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

This topic explains how to create a new Xamarin.Forms cross-platform solution in Visual Studio for Mac, and how to add the DevExpress Grid component to your application using the DevExpress Grid NuGet package.

Create a Solution

  1. Start Visual Studio for Mac and select File | New Solution... in the main menu. In the invoked New Project dialog, switch to the Multiplatform | App section and select the Blank Forms App template. Click Next.


  2. Name the application HelloGrid, select Android and iOS target platforms, and set .NET Standard as the code sharing strategy. Click Next.


  3. Specify the solution's name and location. Click Create.


The newly created solution contains the following projects:

  • HelloGrid - A class library that contains the shared code and UI;
  • HelloGrid.Droid - A project that contains Android specific code and serves as the Android application's entry point;
  • HelloGrid.iOS - A project that contains iOS specific code and serves as the iOS application's entry point.

Add the DevExpress Grid Component to a Solution

Add the DevExpress Grid NuGet package from to the solution's projects:

  1. In a project, right-click the Dependencies | NuGet folder and select Add Packages...


  2. In the invoked Add Packages dialog, search for DevExpress.Mobile.Grid in the package source and click Add Package.


    Add Xamarin.Forms v3.4.0.1008975 to the project before you add the DevExpress Grid package. The DevExpress Grid component supports this Xamarin.Forms version only.


Initialize the DevExpress Grid Component

Add the following initialization code to your Android (MainActivity.cs) and iOS (AppDelegate.cs) projects before the LoadApplication method call:

DevExpress.Mobile.Forms.Init ();

Add Namespaces

Add the following namespace to a XAML markup or C# file in which a Grid instance is created:

using DevExpress.Mobile.DataGrid;

Create a Grid Instance

You can create a GridControl instance using XAML markup...

<ContentPage xmlns="" 
    <dxGrid:GridControl x:Name="grid">

...or C# code.

using System;
using Xamarin.Forms;
using DevExpress.Mobile.DataGrid;

namespace HelloGrid
    public class App : Application
        public App ()
            GridControl grid = new GridControl ();
            MainPage = new ContentPage {
                Content = grid,

The Getting Started section provides an example with detailed instructions on how to create an application with a grid bound to a data source and adjust various settings.