Spread 8.0 Documentation
ActiveX
Support Options

Glossary Item Box

ActiveX


To size columns in bound sheets

  1. Follow the steps listed for Connecting to a Database Using Default Settings to bind the sheet to a database.
  2. To have the columns automatically sized based on the data in the database fields, set the DAutoSizeCols property to either of the following values:
    • 1 (Max Col Width) to size the column to the length of the longest string in the field
    • 2 (Best Guess) to size the column to the length of the database field (the default setting)

      Note: If the bound cells are edit cells, be aware that the default setting of the TypeMaxEditLen property is 60 characters. You must reset the TypeMaxEditLen property to 255 characters to accommodate a text field in the bound database.

  3. If you do not want the columns automatically sized based on the data in the database fields, in the DataColConfig event, set the DAutoSizeCols property to 0 (Off) and if you want, size the columns manually.
  4. At run time, specify the column width with the ColWidth property or use one of the other techniques available for sizing columns, as described in Setting the Width of Columns.
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.