# Handle Spilling Text

FlexGrid for WinForms lets you use the merging behavior to handle spilling of the long text in a cell. Know how can you handle the spilling text here.

## Content

In FlexGrid, you can create the same behavior as excel for handling long text entries by spilling them into empty adjacent cells. This behavior not only helps you in handling long text entries of usual cells but also in displaying outline nodes which are different from data rows. This topic discusses these two scenarios in the following sections. These settings work on the grid level and does not need you to set AllowMerging property of specific row or column.

## Handle Spill in Normal Cells

This FlexGrid setting causes text that is too long to fit in a cell to spill into empty adjacent cells. If you have a long entry in a cell and the adjacent cell is empty, the entry spills onto the adjacent cells to occupy as much room as needed. This behavior can be achieved by setting the <span data-popup-content="This property is available in both \u003ca href=\u0022/componentone/docs/win/online-flexgrid/\u0022\u003e.NET Framework\u003c/a\u003e and \u003ca href=\u0022/componentone/docs/win/online-flexgrid/\u0022\u003e.NET\u003c/a\u003e." data-popup-title="AllowMerging" data-popup-theme="ui-tooltip-green qtip-green">AllowMerging</span> property to **Spill**. For instance, in the image below, long data strings from TestGroup column cells spill to the empty Flag column cells, giving a better visibility of data while using the available space on the grid.

![Handle spill in normal cells](https://cdn.mescius.io/document-site-files/images/2f10b028-0ae8-4c29-a102-4d67578c339b/images/handle-spill.png)

Following code enables spilling of long text to adjacent empty cell in the WinForms FlexGrid.

```csharp
// Spill the long text to adjacent empty cells
c1FlexGrid1.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Spill;
```

```vbnet
' Spill the long text to adjacent empty cells
c1FlexGrid1.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Spill
```

## Handle Text in Node Rows

The Nodes setting is similar to Spill but only applies to outline nodes. This setting is useful when data is organized into groups, and the node rows contain information in a format different from the data rows. For this, you must set the **C1FlexGrid.AllowMerging** property to **Nodes**.

![handle spill in fixed cells](https://cdn.mescius.io/document-site-files/images/2f10b028-0ae8-4c29-a102-4d67578c339b/images/grid-grouping.png)

Following code shows how to handle long text in node rows of the WinForms FlexGrid.

```csharp
// Spill the long text in node rows to adjacent empty cells 
 c1FlexGrid1.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Nodes; 
```

```vbnet
' Spill the long text in node rows to adjacent empty cells 
c1FlexGrid1.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.Nodes    
```