# Integration with FlexGrid

Learn how to integrate Expression Editor control with FlexGrid. See more demos, documentation, and samples here.

## Content

The Expression Editor supports integration with FlexGrid control. Expression Editor, when integrated with grid, enables using expressions on grid and perform operations such as filtering, grouping, sorting, and [column calculation](/componentone/docs/win/online-expressioneditor/Features/Integration-with-FlexGrid/ColumnCalculation) over its data.

To integrate Expression Editor with the FlexGrid, you need to use **DataSource** property of C1FlexGrid class that gets a collection of objects to generate grid data. Once the grid is populated, data source of Expression editor can be bound to data source of FlexGrid using the [DataSource](/componentone/docs/win/online-expressioneditor/) property of C1ExpressionEditor class.

The following image exhibits Expression Editor integrated with FlexGrid control.

<br>
![ExpressionEditor FlexGrid](https://cdn.mescius.io/document-site-files/images/de37eaa0-33b3-4421-b07c-d72c6ec9380d/images/ee-flexgridint.png)

The following code demonstrates integrating FlexGrid with Expression Editor.

```csharp
C1FlexGrid _flexGrid;
C1ExpressionEditor _expEditor;
C1ExpressionEditorPanel _expPanel;
DataView _dvProducts;
DataSet _ds;
public Form1()
{            
    InitializeComponent();
    GetDataSource();
    _flexGrid = new C1FlexGrid();
    _expEditor= new C1ExpressionEditor();
    _expEditor.Dock = DockStyle.Fill;
    _expEditor.ExpressionChanged += _expEditor_ExpressionChanged;
    _expPanel = new C1ExpressionEditorPanel();
    _expPanel.Dock = DockStyle.Fill;
    _expPanel.BringToFront();
    _expPanel.ExpressionEditor = _expEditor;
    _flexGrid.Dock = DockStyle.Fill;
    pnlFlexGrid.Controls.Add(_flexGrid);
    grpEditor.Controls.Add(_expEditor);
    grpExpPanel.Controls.Add(_expPanel);            
    _dvProducts = _ds.Tables["Product"].DefaultView;
    _flexGrid.DataSource = _dvProducts;
    _expEditor.DataSource = _ds.Tables[0];
```

>type=note
> For the detailed data refer the sample project **ExpressionEditorSamples** accompanying the installer.

Following topic discuss column calculation on flexGrid using expressions. However, to understand how expression editor helps in filtering, sorting, and grouping refer product sample accompanying the installer and the blog.