Spread ASP.NET 6.0 Product Documentation
Setting the Cell Types for Bound Data
Send Feedback
Spread ASP.NET 6.0 Product Documentation > Developer's Guide > Managing Data Binding > Setting the Cell Types for Bound Data

Glossary Item Box

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

  1. At design time, in the Properties window, select the FpSpread component.
  2. Select the Sheets property.
  3. Click the button to display the SheetView Collection Editor.
  4. Set the DataAutoCellTypes property.
  5. 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
© 2002-2012 GrapeCity, Inc. All Rights Reserved.