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.
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 AllowMerging 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.
Following code enables spilling of long text to adjacent empty cell in the WinForms FlexGrid.
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.
Following code shows how to handle long text in node rows of the WinForms FlexGrid.