Object Reference > True DBGrid Properties > DataWidth Property |
DataWidth Property
Maximum number of characters available for column input.
column.DataWidth= long
Read/Write at run time and design time.
This property holds the database width, in bytes, for a grid column. It is set to the appropriate field width (not display width) automatically when the layout of a bound grid is initialized at run time.
This property does not affect the physical size of a column, but imposes a limit on the number of characters that may be entered when editing a cell. If set to 0, no such limits are imposed. Setting this property does not cause truncation of existing data.
For bound grids, if the data source does not supply a width value, then no limits are imposed. For both bound and unbound grids, you can set the value of this property in code to restrict the amount of data the user can enter.