| |||||||||||||
DetailsView.CellPadding PropertySystem.Web.UI.WebControls Namespace DetailsView Class .NET Framework version 2.0 Sets or retrieves the amount of space between the contents of the cell and its borders. Syntax
Property Value
The property is read/write with a default value of -1, which indicates that no value is specified. RemarksUse the CellPadding property to control the spacing between the contents of a cell and the cell's border. The padding amount specified is added to all four sides of the cell. All cells in the same column of a DetailsView control have the same width. The padding amount is applied to the widest cell and all other cells in the column are adjusted to that cell width. Similarly, all cells in the same row have the same height. The padding amount is applied to the tallest cell in the row and all other cells in the row are adjusted to that cell height. Individual cell sizes cannot be specified. To adjust the spacing between cells, use the CellSpacing property.
ExampleThe sample below shows how to programmatically set the CellPadding property of a DetailsView at run time, depending on user input. The code also demonstrates how to add the user options to a selectable list dynamically.
See AlsoDetailsView Members CellSpacing GridLines |
| ||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme