C# Class EnterpriseWebLibrary.EnterpriseWebFramework.FormItemBlock

Helps lay out form items in useful ways.
Inheritance: System.Web.UI.WebControls.WebControl, ControlTreeDataLoader
Datei anzeigen Open project: enduracode/enterprise-web-library

Public Methods

Method Description
AddFormItems ( ) : void

Add any number of form items. This method can be called repeatedly.

CreateFormItemList ( bool hideIfEmpty = false, string heading = "", int numberOfColumns = null, int defaultFormItemCellSpan = 1, TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, IEnumerable formItems = null ) : FormItemBlock

Creates a block with the given number of columns where each form item control's label is placed directly on top of it. NumberOfColumns defaults to the sum of the cellspans of the given form items.

CreateFormItemTable ( bool hideIfEmpty = false, string heading = "", System.Web.UI.WebControls.Unit firstColumnWidth = null, System.Web.UI.WebControls.Unit secondColumnWidth = null, IEnumerable formItems = null ) : FormItemBlock

Creates a block with a classic "label on the left, value on the right" layout.

Private Methods

Method Description
ControlTreeDataLoader ( ) : void
FormItemBlock ( bool hideIfEmpty, string heading, bool useFormItemListMode, int numberOfColumns, int defaultFormItemCellSpan, System.Web.UI.WebControls.Unit firstColumnWidth, System.Web.UI.WebControls.Unit secondColumnWidth, TableCellVerticalAlignment verticalAlignment, IEnumerable formItems ) : System
getCellSpan ( FormItem formItem ) : int
getFormItemRows ( IEnumerable formItems, int numberOfColumns ) : IEnumerable>

Returns a list of rows with each row containing as many form items as it can fit, but guaranteed not to exceed the number of columns. Does not add any placeholders, however.

getPlaceholderFormItem ( ) : FormItem
getTableForFormItemList ( ) : WebControl
getTableForFormItemTable ( ) : WebControl

Method Details

AddFormItems() public method

Add any number of form items. This method can be called repeatedly.
public AddFormItems ( ) : void
return void

CreateFormItemList() public static method

Creates a block with the given number of columns where each form item control's label is placed directly on top of it. NumberOfColumns defaults to the sum of the cellspans of the given form items.
public static CreateFormItemList ( bool hideIfEmpty = false, string heading = "", int numberOfColumns = null, int defaultFormItemCellSpan = 1, TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, IEnumerable formItems = null ) : FormItemBlock
hideIfEmpty bool
heading string
numberOfColumns int
defaultFormItemCellSpan int
verticalAlignment TableCellVerticalAlignment
formItems IEnumerable
return FormItemBlock

CreateFormItemTable() public static method

Creates a block with a classic "label on the left, value on the right" layout.
public static CreateFormItemTable ( bool hideIfEmpty = false, string heading = "", System.Web.UI.WebControls.Unit firstColumnWidth = null, System.Web.UI.WebControls.Unit secondColumnWidth = null, IEnumerable formItems = null ) : FormItemBlock
hideIfEmpty bool
heading string
firstColumnWidth System.Web.UI.WebControls.Unit
secondColumnWidth System.Web.UI.WebControls.Unit
formItems IEnumerable
return FormItemBlock