ComponentOne FlexGrid for WinForms
Clearing Content, Styles, and UserData
FlexGrid for WinForms Task-Based Help > Clearing C1FlexGrid > Clearing Content, Styles, and UserData

To clear the contents, style formatting, and UserData of C1FlexGrid, add the following Clear method. In this example, the code was added to the Click event of the Clear All button.

To write code in Visual Basic

Visual Basic
Copy Code
Me.C1FlexGrid1.Clear(C1.Win.C1FlexGrid.ClearFlags.All)

To write code in C#

C#
Copy Code
this.c1FlexGrid1.Clear(C1.Win.C1FlexGrid.ClearFlags.All);

This topic illustrates the following:

Clicking Clear All clears the contents, style formatting, and UserData of the grid, leaving a blank grid.