Click or drag to resize

DataContextAddSelectFieldTOption(String, Boolean, String, String, String, String, String, String, String, String, String, String, String, String, Boolean, RecordRestriction, Boolean, String, Boolean, String, Boolean, String, String) Method

Generates template based select field based on specified parameters.

Namespace: GSF.Web.Model
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax
public string AddSelectField<TOption>(
	string fieldName,
	bool required,
	string optionValueFieldName,
	string optionLabelFieldName = null,
	string optionSortFieldName = null,
	string fieldLabel = null,
	string fieldID = null,
	string groupDataBinding = null,
	string labelDataBinding = null,
	string requiredDataBinding = null,
	string customDataBinding = null,
	string dependencyFieldName = null,
	string optionDataBinding = null,
	string toolTip = null,
	bool initialFocus = false,
	RecordRestriction restriction = null,
	bool allowUnset = false,
	string unsetCaption = "Select value...",
	bool addEmptyRow = false,
	string emptyRowValue = "",
	bool showNoRecordOption = false,
	string noRecordValue = "-1",
	string noRecordText = "No records"
)
where TOption : class, new()
View Source

Parameters

fieldName  String
Field name for value of select field.
required  Boolean
Determines if field name is required.
optionValueFieldName  String
Field name for ID of option data.
optionLabelFieldName  String  (Optional)
Field name for label of option data, defaults to optionValueFieldName
optionSortFieldName  String  (Optional)
Field name for sort order of option data, defaults to optionLabelFieldName
fieldLabel  String  (Optional)
Label name for select field, defaults to fieldName.
fieldID  String  (Optional)
ID to use for select field; defaults to select + fieldName.
groupDataBinding  String  (Optional)
Data-bind operations to apply to outer form-group div, if any.
labelDataBinding  String  (Optional)
Data-bind operations to apply to label, if any.
requiredDataBinding  String  (Optional)
Boolean data-bind operation to apply to required state, if any.
customDataBinding  String  (Optional)
Extra custom data-binding operations to apply to field, if any.
dependencyFieldName  String  (Optional)
Defines default "enabled" subordinate data-bindings based a single boolean field, e.g., a check-box.
optionDataBinding  String  (Optional)
Data-bind operations to apply to each option value, if any.
toolTip  String  (Optional)
Tool tip text to apply to field, if any.
initialFocus  Boolean  (Optional)
Use field for initial focus.
restriction  RecordRestriction  (Optional)
Record restriction to apply, if any.
allowUnset  Boolean  (Optional)
Flag that determines if select can have no selected value.
unsetCaption  String  (Optional)
Label to show when no value is selected; defaults to "Select value...".
addEmptyRow  Boolean  (Optional)
Flag that determines if an empty row should be added to options list.
emptyRowValue  String  (Optional)
Value to use for empty row; defaults to empty string.
showNoRecordOption  Boolean  (Optional)
Flag that determines if an option representing no records should be shown if select query returns no values.
noRecordValue  String  (Optional)
Value for no records option when select query returns no values; defaults to "-1".
noRecordText  String  (Optional)
Text for no records option when select query returns no values; defaults to "No records".

Type Parameters

TOption
Modeled table for option data.

Return Value

String
Generated HTML for new text field based on specified parameters.
See Also