The bound data may be any of several types and Spread provides different cell types to display that data effectively. Most often, you can use the DataAutoCellTypes property of the sheet to allow Spread to automatically match the best cell type with the cells of data. With this property you can turn off the automatic assignment if in certain cases you want to control the cell type. For example, if you have a column of 1's and 0's but you want to treat them as check box settings (checked and unchecked) instead of as numbers, then you can turn off automatic assignment and assign the check box cell type to that column of cells.
For more information about the cell types available, refer to Customizing with Cell Types.
Return to the overview Managing Data Binding.
Using the Properties Window
- At design time, in the Properties window, select the FpSpread component.
- Select the Sheets property.
- Click the button to display the SheetView Collection Editor.
- Set the DataAutoCellTypes property.
- Select OK.
Using a Shortcut
Set the DataAutoCellTypes property.
Example
This example code sets the DataAutoCellTypes property.
C# | Copy Code |
---|---|
FpSpread1.Sheets[0].DataAutoCellTypes = true;
|
VB | Copy Code |
---|---|
FpSpread1.Sheets(0).DataAutoCellTypes = True
|