pf.ListBox

pf.ListBox

ListBox


Properties

AccordionView

AlwaysShowFilterButton

AutoEvaluateText

AutoScrollIntoView

BackColor

Border

BorderRadius

BoxShadow

BubbleChangeEvent

ButtonMode

ClassName

Collapsed

ColumnGroups

ColumnHeaderBackColor

ColumnHeaderBorder

ColumnHeaderCellExtraStyle

ColumnHeaderExtraStyle

ColumnHeaderFontBold

ColumnHeaderFontSize

ColumnHeaderForeColor

ColumnHeaderGroupPadding

ColumnHeaderPadding

ColumnHeaders

Columns

Comments

ContentActiveColor

ContentBorderBottom

ContentCellClassName

ContentCellPadding

ContentCursor

ContentHoverColor

ContentMargin

ContentPadding

CssClear

CurrentPage

Cursor

DefaultValueProvider

DetailContainer

DetailDataItem

DisabledControls

DisplayField

DisplayForm

DisplayFormBinding

DisplayTemplate

DragScroll

DraggableItems

EditForm

EditFormBinding

EditMode

Enabled

EnabledControls

EnabledFormula

EnterKeyMovesDown

EqualityComparer

ExtraDataField

ExtraForm

ExtraFormProvider

ExtraStyle

FadeInEditForm

FilterControlName

FilterFields

Float

FontBold

FontFamily

FontItalics

FontSize

ForeColor

FriendlyName

GroupBackColor

GroupBorder

GroupBorderRadius

GroupBoxShadow

GroupClassName

GroupColor

GroupFieldName

GroupFontBold

GroupFontSize

GroupMargin

GroupPadding

HAlignColumnPadding

HeaderCellClassName

Height

HighlightColor

HighlightColumnHeaders

IgnoreControlDependencies

InitializeFormForEachRow

LazyLoading

LazyLoadingDefaultRowHeight

LazyLoadingMode

LazyLoadingTriggerHeight

Legends

ManualDependencies

ManualEnabledState

ManualVisibleState

Margin

MaxHeight

MaxWidth

Metadata

MetadataText

MinHeight

MinWidth

Name

NoWrap

OnBindGroupItem

OnColumnFilter

OnCreateColumnFilters

OnEditItem

Opacity

Overlay

OverlayOpacity

Padding

PageSize

Paging

Parent

ParentExtraStyle

ParentHorizontalAlignment

ParentVerticalAlignment

PrintExtraStyle

Printable

RecursiveEnabled

Required

SelectableText

SelectedCellClassName

SelectionBackgroundColor

SelectionBorder

SelectionClassName

SelectionExtraStyle

SelectionForeColor

Serializable

ShowWait

SkipPrintModeForRows

SortByGroupField

SortColumnBackColor

SortIndicatorFollowsHAlign

SortedCellClassName

SortedHeaderCellClassName

StaticValue

SuspendChangeEvent

Tag

TargetDataItem

TargetDataItemFieldName

TargetFieldName

TextAlign

Tooltip

TooltipConfiguration

UID

ValidationGroup

ValueConverter

ValueFormatter

ValueProviders

VerticalAlignment

VisibilityFormula

Visible

WaitMsg

Width

AllDesignTimeSettings

TargetFieldNamePropertyName

Methods

AddClass

AddClassName

AddColumnClass

AddGroup

AddItem

AddManualDependency

ApplyColumnFilters

ApplyDefaultValue

BindFilterText

CancelEdit

CancelFilter

ClearAsReadonly

ClearColumnFilters

ClearHighlight

ClearOverflow

ClearSorting

ClearSortingAndFilter

Clone

Collapse

CreateColorLegend

CreateExtraForm

CreateHeader

CreateLegends

CreateRow

CreateSingleFilterButton

DeleteAllItems

DeleteItem

EditItem

EndEditItem

EvaluateValue

Expand

Filter

FilterByFieldValue

FilterText

FixPager

GetActualHeight

GetActualWidth

GetAllChildrenControls

GetAllItems

GetAsyncLoadedControls

GetBackColor

GetBorder

GetBorderRadius

GetBoxShadow

GetChild

GetChildren

GetClassName

GetColumnFilters

GetControl

GetControlAsync

GetControlById

GetControlByTargetFieldName

GetControlByTargetFieldNameAsync

GetControlValue

GetControlsById

GetCssClear

GetCurrent

GetCursor

GetDependencies

GetDisplayValue

GetExtraStyle

GetFilteredData

GetFilteredValue

GetFloat

GetFontBold

GetFontFamily

GetFontItalic

GetFontSize

GetForeColor

GetGroupItem

GetHeight

GetMargin

GetMaxHeight

GetMaxWidth

GetMinHeight

GetMinWidth

GetNumberFormattedValue

GetNumericValue

GetOffsetTop

GetOpacity

GetOverlay

GetOverlayOpacity

GetPadding

GetParentActualHeight

GetParentActualWidth

GetParentControl

GetParentForm

GetParentFormOrSelf

GetPrintExtraStyle

GetPrintValue

GetRootControl

GetRootForm

GetRow

GetSelectedIndex

GetSelectedItem

GetSelectedRow

GetTextAlign

GetTooltip

GetTooltipConfiguration

GetValue

GetValuePath

GetVerticalAlignment

GetVisible

GetWidth

HasChild

HasClass

HideColumn

HideColumnElements

HideWaitIndicator

Highlight

IsEnabled

IsItemDirty

IsLoaded

IsRequired

IsVisible

ItemIsCollapsed

LoadData

LoadFilterValues

MoveDown

MoveUp

PageCount

PrependItem

ReBindRow

RefreshColumnSortingAndVisibility

RefreshItem

RefreshItemsEnabled

RefreshRow

RemoveClass

RemoveClassName

RemoveColumnClass

ScrollIntoView

ScrollItemIntoView

SetAsReadonly

SetBackColor

SetBorder

SetBorderRadius

SetBoxShadow

SetClassName

SetColumnBackColor

SetControlValue

SetCssClear

SetCurrent

SetCursor

SetEnabled

SetEnabledRecursive

SetExtraControl

SetExtraStyle

SetFloat

SetFontBold

SetFontFamily

SetFontItalics

SetFontSize

SetForeColor

SetGroupText

SetHeight

SetItemDirty

SetItemEnabled

SetItemsEnabled

SetLoaded

SetMargin

SetMaxHeight

SetMaxWidth

SetMetadataText

SetMinHeight

SetMinWidth

SetOpacity

SetOverlay

SetOverlayOpacity

SetPadding

SetPage

SetPrintExtraStyle

SetRequired

SetRowEnabled

SetSelectedFirst

SetSelectedIndex

SetSelectedIndexOrFirst

SetSelectedIndexOrLast

SetSelectedItem

SetSelectedLast

SetSelectedListItem

SetTextAlign

SetTooltip

SetTooltipConfiguration

SetValue

SetVerticalAlignment

SetVisible

SetWidth

ShouldAddGlobalCssClass

ShowColumn

ShowColumnElements

ShowWaitIndicator

Sort

SortByField

SupportsUserEdit

SwitchClass

ToMobileView

ToNormalMode

ToNormalModePrintable

ToPrintMode

ToPrintModePrintable

ToViewMode

ToggleClass

UpdateColumnFilterVisibility

View

WaitForAsyncControlsToLoad

toJSON

CreatePropertiesFromHtmlAttributes

FromJSON

FromJSON2

Events

OnBeginEdit

OnBeginEvaluateValue

OnCellCreated

OnControlAdded

OnEndEdit

OnItemChanged

OnItemDeleted

OnLoadCompleted

OnLoaded

OnRowAdded

OnRowCreated

OnSelectedItemChanged

OnValueChangedFromUI

OnValueLoaded

Properties


AccordionView

: boolean
= false

When set to true, every time the user expands a group, all other groups are automatically collapsed
It only works when groups have been defined.



AlwaysShowFilterButton

: boolean
= false

Sets that the filter button (inside the header cells) will be always visible.
If not set, the filter button is visible when the user hovers the column header.
In order for the filter button to be visible in a column, the filter settings must be set
in the columns designer



AutoEvaluateText

: boolean

Inherited from BaseControl.AutoEvaluateText



AutoScrollIntoView

: boolean



BackColor

: string

Sets the background color for the control
Used during control initialization

Inherited from BaseControl.BackColor

Example
var c = new pf.TextBox({BackColor: "gray"});


Border

: string

Sets the border for the control
Used during control initialization

Inherited from BaseControl.Border

Example
var c = new pf.Label({Border: "1px solid #aaa"});


BorderRadius

: string

Sets the border radius for the control
Used during control initialization

Inherited from BaseControl.BorderRadius

Example
var c = new pf.TextBox({BorderRadius: "3px"});


BoxShadow

: string

Defines the css box-shadow for the control
Used during control initialization

Inherited from BaseControl.BoxShadow

Example
var c = new pf.TextBox({BoxShadow: "inset 0px 1px 0px #fff"});


BubbleChangeEvent

: boolean
= false

Defines if the OnValueChange event of the control will trigger the OnValueChange event of the parent form

Inherited from DataControl.BubbleChangeEvent

Example
var c = new pf.TextBox({BubbleChangeEvent: true});


ButtonMode

: boolean

In button mode, each content item behaves as a button (the row is not selected when clicked)
We can use the ItemClick event to add actions



ClassName

: string

Sets the css class name for the control
Used during control initialization

Inherited from BaseControl.ClassName

Example
var c = new pf.TextBox({ClassName: "navbar"});


Collapsed

: boolean



ColumnGroups

: IListBoxColumnGroup[]



ColumnHeaderBackColor

: string

The background color for the header element



ColumnHeaderBorder

: string



ColumnHeaderCellExtraStyle

: string



ColumnHeaderExtraStyle

: string



ColumnHeaderFontBold

: boolean



ColumnHeaderFontSize

: string



ColumnHeaderForeColor

: string



ColumnHeaderGroupPadding

: string



ColumnHeaderPadding

: string



ColumnHeaders

: boolean
= false

Sets if column headers will be visible.
Applicable only when one or more columns have been defined for the listbox.



Columns

: IListBoxColumn[]



Comments

: string

Inherited from BaseControl.Comments



ContentActiveColor

: string



ContentBorderBottom

: string
= "1px #e1e1e1 solid"

Defines the bottom border for each row content



ContentCellClassName

: string

Set the class that will be applied to all content cells



ContentCellPadding

: string



ContentCursor

: string



ContentHoverColor

: string



ContentMargin

: string
= "0"

Sets the content margin



ContentPadding

: string
= "2px 20px"

Sets the content padding



CssClear

: string

Defines the css clear for the control
Used during control initialization

Inherited from BaseControl.CssClear

Example
var c = new pf.TextBox({CssClear: "both"});


CurrentPage

: number



Cursor

: string

Sets the cursor for the control
Used during control initialization
Corresponds to the css cursor object, so available values are all css values (crosshair, default, grab, pointer, text, etc)

Inherited from BaseControl.Cursor

Example
var c = new pf.TextBox({Cursor: "pointer"});


DefaultValueProvider

: any

Includes source code that should return the default value for this control
The default value will be set in the control when the ApplyDefaultValue method is called

Inherited from DataControl.DefaultValueProvider

Example
var c = new pf.TextBox({DefaultValueProvider: "return new Date();"});


DetailContainer

: any

This property holds the control that contains the parent form of the control
in cases that the form is created dynamically.
For example, when a listbox control generates each row, a new form is created for each row of the listbox.
Each control holds a reference of the parent listbox in the "DetailContainer" property.
This enables the control to perform actions using data outside of its form environment.

Inherited from BaseControl.DetailContainer

Example
 
// Access the value of a control in the root form
// the OnClick event of a button inside a listbox row
var parentListbox = args.Sender.DetailContainer;
var rootForm = parentListbox.GetParentForm();
var value = rootForm.GetControl("Date").GetValue();


DetailDataItem

: any

This property holds a reference to the object from a listbox datasource used to create the current row.
It is available in all controls inside a listbox row

Inherited from BaseControl.DetailDataItem



DisabledControls

: string

You can set the names of the inner controls (separated by semicolon) that will be disabled when the listbox becomes enabled.
This works when RecursiveEnabled is set to true.



DisplayField

: string

Defines the property of the data source items to be used in each row of the listbox
The DisplayField property is used if no other method is used to handle the row format
Other options: OnBindItem event, Columns property, DisplayTemplate property

Example
var list = new pf.ListBox({DisplayField: "Name"});


DisplayForm

: string



DisplayFormBinding

: boolean



DisplayTemplate

: string



DragScroll

: boolean



DraggableItems

: boolean



EditForm

: string



EditFormBinding

: boolean



EditMode

: string
= "NoEdit"

Defines the way the listbox edits each row.
Values: "NoEdit", "Auto", "Manual", "Expand"



Enabled

: boolean
= true

Sets if the control is enabled or not
Used during control initialization

Inherited from BaseControl.Enabled

Example
var c = new pf.TextBox({Enabled: false});


EnabledControls

: string

You can set the names of the inner controls (separated by semicolon) that will be enabled when the listbox becomes disabled.
This works when RecursiveEnabled is set to true.



EnabledFormula

: string

Defines a javascript formula that will define when the control is enabled
The formula is automatically re-evaluated each time a control that is referenced in the formula changes its value

Inherited from BaseControl.EnabledFormula

Example
var formula = "form.GetControl(\"activeCheckbox\").GetValue()";
var c = new pf.Button({EnabledFormula: formula});
Example
// Formula
form.GetControl("checkbox").GetValue() && form.GetControl("Name") != ""


EnterKeyMovesDown

: boolean
= false

Sets if the ENTER key will select the next row



EqualityComparer

:



ExtraDataField

: string



ExtraForm

: string



ExtraFormProvider

: string



ExtraStyle

: string

Sets any extra css styles to the control
Used during control initialization

Inherited from BaseControl.ExtraStyle

Example
var c = new pf.Label({ExtraStyle: "margin-left:20px;background-color:#ccc"});


FadeInEditForm

: boolean
= false



FilterControlName

: string

Is the name of the control (in the same parent form) that will be used to filter listbox contents.
Works combined with the FilterFields property



FilterFields

: string

Include the names of listbox data source fields (comcatenated with semicolon) that will be searched
against the value from the FilterControlName bound to filter the listbox



Float

: string

Defines the css float for the control
Used during control initialization

Inherited from BaseControl.Float

Example
var c = new pf.TextBox({Float: "right"});


FontBold

: boolean
= false

Sets if the control font is bold
Used during control initialization

Inherited from BaseControl.FontBold

Example
var c = new pf.Label({FontBold: true});


FontFamily

: string

Sets the font family for the control
Used during control initialization

Inherited from BaseControl.FontFamily

Example
var c = new pf.Label({FontFamily: "Arial"});


FontItalics

: boolean
= false

Sets if the control font style is italic
Used during control initialization

Inherited from BaseControl.FontItalics

Example
var c = new pf.Label({FontItalics: true});


FontSize

: string

Sets the font-size for the control
Used during control initialization

Inherited from BaseControl.FontSize

Example
var c = new pf.Label({FontSize: "20px"});


ForeColor

: string

Sets the foreground color for the control
Used during control initialization

Inherited from BaseControl.ForeColor

Example
var c = new pf.TextBox({ForeColor: "blue"});


FriendlyName

: string

Inherited from DataControl.FriendlyName



GroupBackColor

: string
= "#f0f0f0"

Defines the background color of group rows



GroupBorder

: string

Defines the border of group rows



GroupBorderRadius

: string

Defines the border radius of group rows



GroupBoxShadow

: string

Defines the Box Shadow of group rows



GroupClassName

: string
= ""

Defines the class name of group rows



GroupColor

: string
= "#333333"

Defines the color of group rows



GroupFieldName

: string

Sets the field of the data source items to be used to group rows

Example
var list = new pf.ListBox({DisplayField: "Name", GroupFieldName: "Type"});


GroupFontBold

: boolean
= true

Defines if the group row font is bold



GroupFontSize

: string

Sets the font size of the group row



GroupMargin

: string

Defines the margin of group rows



GroupPadding

: string

Defines the padding of group rows



HAlignColumnPadding

: string



HeaderCellClassName

: string

Set the class that will be applied to all header cells



Height

: string

Sets the height for the control
Used during control initialization.

Inherited from BaseControl.Height

Example
var c = new pf.ListBox({Height: "150px"});


HighlightColor

: string



HighlightColumnHeaders

: boolean



IgnoreControlDependencies

: string

Inherited from BaseControl.IgnoreControlDependencies



InitializeFormForEachRow

: boolean



LazyLoading

: boolean
= false

Defines if the rows of the listbox will be created all at one, or as the user scrolls.
When set to true, it can increase performance, specially in listboxes with a large number of rows and no paging.
Combined with "LazyLoadingMode" property



LazyLoadingDefaultRowHeight

: string



LazyLoadingMode

: string



LazyLoadingTriggerHeight

: number



Legends

: ILegendDefinition[]



ManualDependencies

: any

Inherited from BaseControl.ManualDependencies



ManualEnabledState

: boolean

Inherited from BaseControl.ManualEnabledState



ManualVisibleState

: boolean

Inherited from BaseControl.ManualVisibleState



Margin

: string

Sets the css margin for the control
Used during control initialization

Inherited from BaseControl.Margin

Example
var c = new pf.Label({Margin: "10px"});


MaxHeight

: string

Sets the maximum height for the control
Used during control initialization

Inherited from BaseControl.MaxHeight

Example
var c = new pf.ListBox({MaxHeight: "300px"});


MaxWidth

: string

Sets the maximum width for the control
Used during control initialization

Inherited from BaseControl.MaxWidth

Example
var c = new pf.TextBox({MaxWidth: "200px"});


Metadata

: string

Inherited from BaseControl.Metadata



MetadataText

: string

Inherited from BaseControl.MetadataText



MinHeight

: string

Sets the minimum height for the control
Used during control initialization

Inherited from BaseControl.MinHeight

Example
var c = new pf.Button({MinHeight: "20px"});


MinWidth

: string

Sets the minimum width for the control
Used during control initialization

Inherited from BaseControl.MinWidth

Example
var c = new pf.Button({MinWidth: "40px"});


Name

: string

The name of the control

Inherited from BaseControl.Name



NoWrap

: boolean



OnBindGroupItem

: DynamicUserFunction



OnColumnFilter

: DynamicUserFunction



OnCreateColumnFilters

: DynamicUserFunction



OnEditItem

: DynamicUserFunction



Opacity

: string

Sets the opacity for the control
Used during control initialization

Inherited from BaseControl.Opacity

Example
var c = new pf.Label({Text: "My Label", Opacity: "0.4"});


Overlay

: boolean

Inherited from BaseControl.Overlay



OverlayOpacity

: string

Inherited from BaseControl.OverlayOpacity



Padding

: string

Sets the padding for the control
Used during control initialization

Inherited from BaseControl.Padding

Example
var c = new pf.Label({HtmlElement: "div", Padding: "10px"});


PageSize

: number
= 50

Sets the number of items that will be shown in each page.
"Paging" set to true is required.



Paging

: boolean
= false

Sets if the listbox will show data in pages.
Used in combination with the "PageSize" property.



Parent

: IControl

Inherited from BaseControl.Parent



ParentExtraStyle

: string

Inherited from BaseControl.ParentExtraStyle



ParentHorizontalAlignment

: string

Inherited from BaseControl.ParentHorizontalAlignment



ParentVerticalAlignment

: string

Inherited from BaseControl.ParentVerticalAlignment



PrintExtraStyle

: string

Inherited from BaseControl.PrintExtraStyle



Printable

: boolean

Inherited from BaseControl.Printable



RecursiveEnabled

: boolean



Required

: boolean

Defines if the data control must contain a value
This is used when calling the Validate method of the parent form object
Used during control initialization

Inherited from DataControl.Required



SelectableText

: boolean
= true

Defines if the text in listbox rows is selectable



SelectedCellClassName

: string

Set the class that will be applied to each cell in the selected row



SelectionBackgroundColor

: string
= "#0078D7"

Defines the background color of the selected row



SelectionBorder

: string

Defines the border of selected rows



SelectionClassName

: string



SelectionExtraStyle

: string



SelectionForeColor

: string
= "white"

Defines the foreground color for selected rows



Serializable

: boolean
= true

Indicates if the control should be serialized in the designer
For controls that are created dynamically during runtime, the user may set this property to true to avoid them being serialized

Inherited from BaseControl.Serializable



ShowWait

: boolean
= false

Defines if a waiting indicator will be shown while the listbox loads its data (using a data provider)



SkipPrintModeForRows

: boolean



SortByGroupField

: boolean
= true

Defines if the data will be sorted by the Group Field before presented



SortColumnBackColor

: string



SortIndicatorFollowsHAlign

: boolean



SortedCellClassName

: string

Set the class that will be applied to each cell in the sorted column



SortedHeaderCellClassName

: string

Set the class that will be applied to the header cell of the sorted column



StaticValue

: any

Inherited from DataControl.StaticValue



SuspendChangeEvent

: boolean
= false

Suspends the control from firing the OnValueChanged event

Inherited from DataControl.SuspendChangeEvent



Tag

: any

An object that can be used as a placeholder of dynamic properties a user may set to a control during runtime

Inherited from BaseControl.Tag



TargetDataItem

: any

Inherited from DataControl.TargetDataItem



TargetDataItemFieldName

: string

Inherited from DataControl.TargetDataItemFieldName



TargetFieldName

: string

Inherited from DataControl.TargetFieldName

Example
// Create a new form
var form = new pf.Form();
// Add a simple container in the form body
var container = new pf.SimpleContainer();
form.AddControl(container);
// Create 3 textboxes with different TargetFieldName properties
var textID = new pf.TextBox({TargetFieldName: "ID"});
var textName = new pf.TextBox({TargetFieldName: "Name"});
var textType = new pf.TextBox({TargetFieldName: "Type"});
// Add the textboxes in the container
container.AddControl(textID);
container.AddControl(textName);
container.AddControl(textType);
var value = form.GetValue();
// Returns something like : {ID: "my id", Name: "my name", Type: "my type"}


TextAlign

: string

Defines the css text alignment for the control
Used during control initialization

Inherited from BaseControl.TextAlign

Example
var c = new pf.TextBox({TextAlign: "center"});


Tooltip

: string

Sets the tooltip for the control

Inherited from BaseControl.Tooltip

Example
var c = new pf.TextBox({Tooltip: "The address of the customer"});


TooltipConfiguration

: ITooltipOptions

Inherited from BaseControl.TooltipConfiguration



UID

: string
= A new GUID is generated for each control

A unique identifier for the control
Used during control initialization

Inherited from BaseControl.UID



ValidationGroup

: string

Inherited from DataControl.ValidationGroup



ValueConverter

: DynamicUserFunction

Inherited from DataControl.ValueConverter



ValueFormatter

: DynamicUserFunction

Inherited from DataControl.ValueFormatter



ValueProviders

: IDataProvider[]

Inherited from DataControl.ValueProviders



VerticalAlignment

: string

Inherited from BaseControl.VerticalAlignment



VisibilityFormula

: string

Defines a javascript formula that will define when the control is visible
The formula is automatically re-evaluated each time a control that is referenced in the formula changes its value

Inherited from BaseControl.VisibilityFormula

Example
var formula = "form.GetControl(\"activeCheckbox\").GetValue()";
var c = new pf.Button({VisibilityFormula: formula});
Example
// Formula
form.GetControl("checkbox").GetValue() && form.GetControl("Name") != ""


Visible

: boolean
= true

Sets if the control is visible or not
Used during control initialization

Inherited from BaseControl.Visible

Example
var c = new pf.TextBox({Visible: false});


WaitMsg

: string
= "Loading..."

The message that will be displayed while the listbox is loading its value.



Width

: string

Sets the width of the control
Used during control initialization

Inherited from BaseControl.Width

Example
var c = new pf.TextBox({Width: "100px"});


AllDesignTimeSettings

: IDesignTimeSettings



TargetFieldNamePropertyName

: string

Inherited from DataControl.TargetFieldNamePropertyName


Methods


AddClass

(className: string[])
: void
Inherited from BaseControl.AddClass




AddClassName

(cls: string)
: void
Adds a css class to a control

Inherited from BaseControl.AddClassName

Example
form.GetControl("Title").AddClassName("active");



AddColumnClass

(idx: number, className: string)
: void



AddGroup

(item: any, parent: ListBoxItem, addFirst: boolean)
: ListBoxItem



AddItem

(item: any, parent: ListBoxItem, addFirst: boolean)
: ListBoxItem
Adds a new item in the listbox

Example
var item = {ID: 1, Name: "Task 1"};
form.GetControl("list1").AddItem(item, null, true);



AddManualDependency

(name: string, dep: IControlDependency)
: void
Inherited from BaseControl.AddManualDependency




ApplyColumnFilters

()
: void



ApplyDefaultValue

(value: any)
: void
Applies a default value for the data control

Inherited from DataControl.ApplyDefaultValue




BindFilterText

(c: DataControl, fields: string[])
: void



CancelEdit

()
: void



CancelFilter

()
: void



ClearAsReadonly

(exceptions: string[])
: void
Inherited from BaseControl.ClearAsReadonly




ClearColumnFilters

()
: void



ClearHighlight

()
: void



ClearOverflow

()
: void



ClearSorting

()
: void



ClearSortingAndFilter

()
: void



Clone

()
: BaseControl
Inherited from BaseControl.Clone




Collapse

()
: void



CreateColorLegend

(field: string, maxColumns: number, maps: IListLegendMapping[])
: TableContainer



CreateExtraForm

(item: ListBoxItem, callback: any)
: void



CreateHeader

()
: void



CreateLegends

()
: void



CreateRow

(item: any)
: TableContainer



CreateSingleFilterButton

(column: IListBoxColumn, headerControl: BaseControl)
: MenuButton



DeleteAllItems

()
: void
Deletes all items from the list

Example
form.GetControl("list1").DeleteAllItems();



DeleteItem

(record: any)
: void
Removes a specific row from the list.

Example
var list = form.GetControl("list1");
var data = [
{ID: 1, Name: "Task 1"},
{ID: 2, Name: "Task 2"}
];
list.SetValue(data);
list.DeleteItem(data[0]);



EditItem

(record: any)
: void



EndEditItem

(record: any, save: boolean)
: void



EvaluateValue

(options: any, callback: any)
: void
For data controls that have value data providers set, calling this method forces a re-execution
of value provider(s). Value provider conditions will be re-evaluated

Inherited from DataControl.EvaluateValue




Expand

()
: void



Filter

(filterFunc: )
: void
Filters listbox data based on a comparer method.
After filtering, the value of the listbox deas not change.
It only affects the visible items (view)

Example
// Filter listbox items that have amount greater than zero
var listbox = form.GetControl("list1");
listbox.Filter(function(data) {
var newData = [];
data.forEach(function(x) {
if (x.Amount > 0) newData.push(x);
});
return newData;
});



FilterByFieldValue

(fieldName: string, fieldValue: string)
: void



FilterText

(searchText: string, fields: string[])
: void



FixPager

()
: void



GetActualHeight

()
: number
Inherited from BaseControl.GetActualHeight




GetActualWidth

()
: number
Inherited from BaseControl.GetActualWidth




GetAllChildrenControls

()
:
Returns all children controls for this control

Inherited from BaseControl.GetAllChildrenControls

Example
var children = c.GetAllChildrenControls();



GetAllItems

()
:



GetAsyncLoadedControls

()
:
Inherited from BaseControl.GetAsyncLoadedControls




GetBackColor

()
: string
Inherited from BaseControl.GetBackColor




GetBorder

()
: string
Inherited from BaseControl.GetBorder




GetBorderRadius

()
: string
Inherited from BaseControl.GetBorderRadius




GetBoxShadow

()
: string
Inherited from BaseControl.GetBoxShadow




GetChild

(name: string)
: IControl
Returns the first child control (direct child) that has a specific name
Search is case sensitive

Inherited from BaseControl.GetChild

Example
var control = container.GetChild("TitleTextBox");



GetChildren

()
:
Inherited from DataControl.GetChildren




GetClassName

()
: string
Inherited from BaseControl.GetClassName




GetColumnFilters

()
:



GetControl

(name: string)
: IControl
Returns the first child control (recursively) that has a specific name
Search is case sensitive

Inherited from BaseControl.GetControl

Example
var control = container.GetControl("TitleTextBox");



GetControlAsync

(name: string, callback: , maxTime: number)
: void
Searches for a child control asynchronously in cases that child controls are loaded at a later stage.
This could happen when dynamic loading Template controls.
Default time is 3000 (ms)

Inherited from BaseControl.GetControlAsync

Example
form.GetControlAsync("clientId", function(control) {
if (control) control.SetEnabled(false);
}, 2000);



GetControlById

(id: string)
: IControl
Returns the first child control (recursively) that has a specific UID

Inherited from BaseControl.GetControlById

Example
var control = container.GetControlById("ID1");



GetControlByTargetFieldName

(name: string)
: IDataControl
Returns a control by its TargetFieldName property

Inherited from BaseControl.GetControlByTargetFieldName

Example
var c = form.GetControlByTargetFieldName("CustomerType");



GetControlByTargetFieldNameAsync

(name: string, callback: , maxTime: number)
: void
Inherited from BaseControl.GetControlByTargetFieldNameAsync




GetControlValue

()
: any



GetControlsById

(uid: string)
:
Returns child controls (recursively) that have a specific UID

Inherited from BaseControl.GetControlsById

Example
var controls = container.GetControlsById("ID1");



GetCssClear

()
: string
Inherited from BaseControl.GetCssClear




GetCurrent

()
: any



GetCursor

()
: string
Inherited from BaseControl.GetCursor




GetDependencies

(name: string)
: IControlDependency
Inherited from BaseControl.GetDependencies




GetDisplayValue

()
: any



GetExtraStyle

()
: string
Inherited from BaseControl.GetExtraStyle




GetFilteredData

()
:



GetFilteredValue

()
: any



GetFloat

()
: string
Inherited from BaseControl.GetFloat




GetFontBold

()
: boolean
Inherited from BaseControl.GetFontBold




GetFontFamily

()
: string
Inherited from BaseControl.GetFontFamily




GetFontItalic

()
: boolean
Inherited from BaseControl.GetFontItalic




GetFontSize

()
: string
Inherited from BaseControl.GetFontSize




GetForeColor

()
: string
Inherited from BaseControl.GetForeColor




GetGroupItem

(key: string)
: ListBoxItem



GetHeight

()
: string
Returns the height of the control

Inherited from BaseControl.GetHeight




GetMargin

()
: string
Returns the css margin of the control

Inherited from BaseControl.GetMargin




GetMaxHeight

()
: string
Inherited from BaseControl.GetMaxHeight




GetMaxWidth

()
: string
Inherited from BaseControl.GetMaxWidth




GetMinHeight

()
: string
Inherited from BaseControl.GetMinHeight




GetMinWidth

()
: string
Inherited from BaseControl.GetMinWidth




GetNumberFormattedValue

(value: number, format: string, decimals: number, min: number, max: number)
: string
Inherited from DataControl.GetNumberFormattedValue




GetNumericValue

()
: number
Returns the value of a data control converted to a number or zero is no conversion can be performed

Inherited from DataControl.GetNumericValue

Example
var amount = form.GetControl("Amount").GetNumericValue() * 100;



GetOffsetTop

()
: number
Inherited from BaseControl.GetOffsetTop




GetOpacity

()
: string
Inherited from BaseControl.GetOpacity




GetOverlay

()
: boolean
Inherited from BaseControl.GetOverlay




GetOverlayOpacity

()
: string
Inherited from BaseControl.GetOverlayOpacity




GetPadding

()
: string
Returns the css padding of the control

Inherited from BaseControl.GetPadding




GetParentActualHeight

()
: number
Inherited from BaseControl.GetParentActualHeight




GetParentActualWidth

()
: number
Inherited from BaseControl.GetParentActualWidth




GetParentControl

(name: string)
: IControl
Inherited from BaseControl.GetParentControl




GetParentForm

()
: Form
Returns the parent form object

Inherited from BaseControl.GetParentForm

Example
var parent = c.GetParentForm();



GetParentFormOrSelf

()
: Form
Returns the parent form object or self if the referenced control is a Form object

Inherited from BaseControl.GetParentFormOrSelf

Example
var parent = c.GetParentFormOrSelf();



GetPrintExtraStyle

()
: string
Inherited from BaseControl.GetPrintExtraStyle




GetPrintValue

()
: string
Inherited from DataControl.GetPrintValue




GetRootControl

()
: any
Returns the root Html element for this control

Inherited from BaseControl.GetRootControl




GetRootForm

()
: Form
Inherited from BaseControl.GetRootForm




GetRow

(item: any)
: ListBoxItem



GetSelectedIndex

()
: number
Returns the selected item index




GetSelectedItem

()
: any
Returns the selected item

Example
var selectedItem = form.GetControl("list1").GetSelectedItem();



GetSelectedRow

()
: ListBoxItem



GetTextAlign

()
: string
Inherited from BaseControl.GetTextAlign




GetTooltip

()
: string
Inherited from BaseControl.GetTooltip




GetTooltipConfiguration

()
: ITooltipOptions
Inherited from BaseControl.GetTooltipConfiguration




GetValue

()
: any
Returns the value of a data control
The value may be different from the GetControlValue method because there may be a value converter defined for the control

Inherited from DataControl.GetValue

Example
var active = form.GetControl("checkbox").GetValue();
var text = form.GetControl("textbox").GetValue();
var items = form.GetControl("listbox").GetValue();



GetValuePath

(path: string, sep: string)
: any
When the returned value is a complex type, GetValuePath evaluates the provided path

Inherited from DataControl.GetValuePath

Example
// Get the value from a control that returns a single object (like a combobox)
var value = form.GetControl("Country");
// returns {ID: 1, Name: "UK"}
var result = form.GetControl("Country").GetValuePath("Name");
// returns "UK"
var result = form.GetControl("Country").GetValuePath("ID");
// returns "1"
Example
// Get the value from a control that returns multiple objects (like a combobox with miltiple selection enabled)
var value = form.GetControl("Countries");
// returns [{ID: 1, Name: "UK"},{ID: 2, Name: "France"}]
var result = form.GetControl("Counties").GetValuePath("Name", ", ");
// returns "UK, France"
var result = form.GetControl("Counties").GetValuePath("ID", ";");
// returns "1;2"



GetVerticalAlignment

()
: string
Inherited from BaseControl.GetVerticalAlignment




GetVisible

()
: boolean
Inherited from BaseControl.GetVisible




GetWidth

()
: string
Inherited from BaseControl.GetWidth




HasChild

(c: BaseControl)
: boolean
Inherited from BaseControl.HasChild




HasClass

(className: string)
: boolean
Returns true if the control has a specific class

Inherited from BaseControl.HasClass




HideColumn

(columnName: any)
: void



HideColumnElements

(columnName: any)
: void



HideWaitIndicator

()
: void



Highlight

(fieldName: string, fieldValue: string)
: void



IsEnabled

()
: boolean
Inherited from BaseControl.IsEnabled




IsItemDirty

(item: any)
: boolean



IsLoaded

()
: boolean
Inherited from BaseControl.IsLoaded




IsRequired

()
: boolean
Returns if the control is required

Inherited from DataControl.IsRequired




IsVisible

()
: boolean
Inherited from BaseControl.IsVisible




ItemIsCollapsed

(item: ListBoxItem)
: boolean



LoadData

()
: void



LoadFilterValues

(button: MenuButton)
: void



MoveDown

(item: ListBoxItem, array: any[])
: boolean



MoveUp

(item: ListBoxItem, array: any[])
: boolean



PageCount

()
: number



PrependItem

(item: any, parent: ListBoxItem)
: ListBoxItem



ReBindRow

(item: any)
: void



RefreshColumnSortingAndVisibility

()
: void



RefreshItem

(record: any)
: void



RefreshItemsEnabled

()
: void



RefreshRow

(control: ListBoxItem)
: void



RemoveClass

(className: string[])
: void
Inherited from BaseControl.RemoveClass




RemoveClassName

(cls: string)
: void
Removes a css class from a control

Inherited from BaseControl.RemoveClassName

Example
form.GetControl("Title").RemoveClassName("active");



RemoveColumnClass

(idx: number, className: string)
: void



ScrollIntoView

()
: void
Inherited from BaseControl.ScrollIntoView




ScrollItemIntoView

(item: any, efficient: boolean)
: void
Scrolls the listbox so the specific item is visible to the user
Default behavior: Scrolls the object so that top of the object is visible at the top of the window.
Pass directional: true to only scroll if outside of visible range and align to top or bottom based on position.

Example
var list = form.GetControl("list1");
var data = [];
for (var i = 0; i < 50; i ++) {
var item = {ID: i, Name: "Task " + i};
data.push(item);
}
list.SetValue(data);
list.ScrollItemIntoView(data[49]);
list.SetSelectedItem(data[49]);



SetAsReadonly

(exceptions: string[])
: void



SetBackColor

(color: string)
: void
Sets the background color for the control

Inherited from BaseControl.SetBackColor

Example
form.GetControl("Name").SetBackColor("blue");



SetBorder

(border: string)
: void
Sets the css border for the control

Inherited from BaseControl.SetBorder

Example
form.GetControl("Name").SetBorder("1px solid #aaa");



SetBorderRadius

(radius: string)
: void
Sets the css border radius for the control

Inherited from BaseControl.SetBorderRadius

Example
form.GetControl("Name").SetBorderRadius("3px");



SetBoxShadow

(value: string)
: void
Sets the css box dhadow for the control

Inherited from BaseControl.SetBoxShadow

Example
form.GetControl("Name").SetBoxShadow("inset 0px 1px 0px #fff");



SetClassName

(cls: string)
: void
Sets the css class for a control

Inherited from BaseControl.SetClassName

Example
form.GetControl("Title").SetClassName("active");



SetColumnBackColor

(idx: number, color: string)
: void



SetControlValue

(value: any)
: boolean



SetCssClear

(clear: string)
: void
Sets the css clear for the control

Inherited from BaseControl.SetCssClear

Example
form.GetControl("Name").SetCssClear("both");



SetCurrent

(item: any)
: void



SetCursor

(cursor: string)
: void
Sets the css cursor for the control

Inherited from BaseControl.SetCursor

Example
form.GetControl("Name").SetCursor("pointer");



SetEnabled

(enabled: any)
: void



SetEnabledRecursive

(enabled: any, exceptions: string[])
: void
Inherited from BaseControl.SetEnabledRecursive




SetExtraControl

(c: BaseControl, item: any)
: void



SetExtraStyle

(style: string)
: void
Sets extra css styles to the control

Inherited from BaseControl.SetExtraStyle

Example
form.GetControl("Name").SetExtraStyle("margin-top:10px;clear:both;");



SetFloat

(cssFloat: string)
: void
Sets the css float for the control

Inherited from BaseControl.SetFloat

Example
form.GetControl("Name").SetFloat("right");



SetFontBold

(bold: boolean)
: void
Sets the font-bold property for the control

Inherited from BaseControl.SetFontBold

Example
form.GetControl("Name").SetFontBold(true);



SetFontFamily

(family: string)
: void
Sets the font family for the control

Inherited from BaseControl.SetFontFamily

Example
form.GetControl("Name").SetFontFamily("Arial");



SetFontItalics

(italics: boolean)
: void
Sets the font style for the control

Inherited from BaseControl.SetFontItalics

Example
form.GetControl("Name").SetFontItalics(true);



SetFontSize

(size: string)
: void
Sets the font size for the control

Inherited from BaseControl.SetFontSize

Example
form.GetControl("Name").SetFontSize("14px");



SetForeColor

(color: string)
: void
Sets the foreground color for the control

Inherited from BaseControl.SetForeColor

Example
form.GetControl("Name").SetForeColor("#c00");



SetGroupText

(key: string, text: string)
: void



SetHeight

(height: string)
: void
Sets the height of the control

Inherited from BaseControl.SetHeight

Example
form.GetControl("Name").SetHeight("20px");



SetItemDirty

(item: any, dirty: boolean)
: void



SetItemEnabled

(enabled: any, item: any)
: void



SetItemsEnabled

(enabled: any)
: void



SetLoaded

()
: void
Inherited from BaseControl.SetLoaded




SetMargin

(margin: string)
: void
Sets the css margin for the control

Inherited from BaseControl.SetMargin

Example
form.GetControl("Name").SetMargin("10px 20px");
Example
form.GetControl("Name").SetMargin("10px");
Example
form.GetControl("Name").SetMargin("10px 20px 30px 40px");



SetMaxHeight

(height: string)
: void
Sets the maximum height for the control

Inherited from BaseControl.SetMaxHeight

Example
form.GetControl("Name").SetMaxHeight("200px");



SetMaxWidth

(width: string)
: void
Sets the maximum width for the control

Inherited from BaseControl.SetMaxWidth

Example
form.GetControl("Name").SetMaxWidth("200px");



SetMetadataText

(metadataText: string)
: void
Inherited from BaseControl.SetMetadataText




SetMinHeight

(height: string)
: void
Sets the minimum height for the control

Inherited from BaseControl.SetMinHeight

Example
form.GetControl("Name").SetMinHeight("200px");



SetMinWidth

(width: string)
: void
Sets the minimum width for the control

Inherited from BaseControl.SetMinWidth

Example
form.GetControl("Name").SetMinWidth("50px");



SetOpacity

(op: string)
: void
Sets the opacity for the control

Inherited from BaseControl.SetOpacity

Example
form.GetControl("Name").SetOpacity("0.6");



SetOverlay

(set: boolean)
: void
Inherited from BaseControl.SetOverlay




SetOverlayOpacity

(opacity: string)
: void
Inherited from BaseControl.SetOverlayOpacity




SetPadding

(padding: string)
: void
Sets the css padding for the control

Inherited from BaseControl.SetPadding

Example
form.GetControl("Name").SetPadding("10px 20px");
Example
form.GetControl("Name").SetPadding("10px");
Example
form.GetControl("Name").SetPadding("10px 20px 30px 40px");



SetPage

(pageNo: number)
: void



SetPrintExtraStyle

(style: string)
: void
Inherited from BaseControl.SetPrintExtraStyle




SetRequired

(required: any)
: void
Sets the control Required property

Inherited from DataControl.SetRequired




SetRowEnabled

(enabled: any, li: ListBoxItem)
: void



SetSelectedFirst

()
: any
Selects the first item (if any)




SetSelectedIndex

(index: number)
: any
Selects the item at a specific index




SetSelectedIndexOrFirst

(index: number)
: any



SetSelectedIndexOrLast

(index: number)
: any



SetSelectedItem

(item: any, comparer: , event: any)
: any
Selects a specific item in the list

Example
// Selects an item when the user has a reference to the actual data item in the listbox
var list = form.GetControl("list1").GetValue();
var data = list.GetValue();
if (data.length > 0) {
list.SetSelectedItem(data[0]);
}
Example
// Selects an item based on a field value
var list = form.GetControl("list1").GetValue();
list.SetSelectedItem({ID: 1}, function(a,b) { return a.ID === b.ID });



SetSelectedLast

()
: any
Selects the last item (if any)




SetSelectedListItem

(item: any)
: any



SetTextAlign

(align: string)
: void
Sets the css text alignment for the control

Inherited from BaseControl.SetTextAlign

Example
form.GetControl("Name").SetTextAlign("center");



SetTooltip

(tooltip: string, options: any)
: void
Sets a tooltip for the control

Inherited from BaseControl.SetTooltip

Example
form.GetControl("Address").SetTooltip("This is the address field");



SetTooltipConfiguration

(value: ITooltipOptions)
: void
Inherited from BaseControl.SetTooltipConfiguration




SetValue

(value: any)
: void
Sets a value for the data control

Inherited from DataControl.SetValue

Example
form.GetControl("CustomerCombo").SetValue({ID: "1", Name: "CustomerA"});
form.GetControl("checkbox").SetValue(true);
form.GetControl("label1").SetValue("My label text");



SetVerticalAlignment

(align: string)
: void
Inherited from BaseControl.SetVerticalAlignment




SetVisible

(visible: boolean)
: void
Hides or shows a control

Inherited from BaseControl.SetVisible

Example
form.GetControl("Title").SetVisible(false);



SetWidth

(width: string)
: void



ShouldAddGlobalCssClass

()
: boolean
Inherited from BaseControl.ShouldAddGlobalCssClass




ShowColumn

(columnName: any)
: void



ShowColumnElements

(columnName: any)
: void



ShowWaitIndicator

()
: void



Sort

(compare: )
: void



SortByField

(fieldName: string, ascending: boolean, dataType: string)
: void



SupportsUserEdit

()
: boolean
Inherited from DataControl.SupportsUserEdit




SwitchClass

(condition: boolean, classNames: string[])
: void
Inherited from BaseControl.SwitchClass




ToMobileView

()
: void



ToNormalMode

()
: void



ToNormalModePrintable

()
: boolean
Inherited from BaseControl.ToNormalModePrintable




ToPrintMode

()
: void



ToPrintModePrintable

()
: boolean
Inherited from BaseControl.ToPrintModePrintable




ToViewMode

()
: void



ToggleClass

(classNames: string[])
: void
Inherited from BaseControl.ToggleClass




UpdateColumnFilterVisibility

()
: void



View

(data: any[])
:



WaitForAsyncControlsToLoad

(callback: any)
: void
Inherited from BaseControl.WaitForAsyncControlsToLoad




toJSON

()
: any



CreatePropertiesFromHtmlAttributes

(c: BaseControl, el: HTMLElement)
: any
Inherited from BaseControl.CreatePropertiesFromHtmlAttributes




FromJSON

(def: any)
: ListBox



FromJSON2

(r: ListBox, def: any)
: ListBox


Events


OnBeginEdit

(form: pf.Form, args: IItemEventArgs (Control: any, DataItem: any, Parent: any, Sender: any))
:



OnBeginEvaluateValue

(form: pf.Form, args: IEventArgs (Parent: any, Sender: any))
:
Inherited from DataControl.OnBeginEvaluateValue




OnCellCreated

(form: pf.Form, args: IListBoxItemEventArgs (Column: IListBoxColumn, ColumnName: string, Control: any, DataItem: any, FieldName: string, Parent: any, Sender: any))
:



OnControlAdded

(form: pf.Form, args: IControlAddedEventArgs (Control: any, Parent: any, Sender: any))
:
Inherited from BaseControl.OnControlAdded




OnEndEdit

(form: pf.Form, args: IItemEventArgs (Control: any, DataItem: any, Parent: any, Sender: any))
:



OnItemChanged

(form: pf.Form, args: IItemEventArgs (Control: any, DataItem: any, Parent: any, Sender: any))
:



OnItemDeleted

(form: pf.Form, args: IItemEventArgs (Control: any, DataItem: any, Parent: any, Sender: any))
:



OnLoadCompleted

(form: pf.Form, args: IEventArgs (Parent: any, Sender: any))
:



OnLoaded

(form: pf.Form, args: IEventArgs (Parent: any, Sender: any))
:
Inherited from BaseControl.OnLoaded




OnRowAdded

(form: pf.Form, args: IListBoxFormAddedEventArgs (Control: ListBoxItem, DataItem: any, Form: Form, Parent: any, Sender: any))
:



OnRowCreated

(form: pf.Form, args: IRowCreatedArgs (Control: any, DataItem: any, DisplayContainer: SimpleContainer, Parent: any, RootControl: BaseControl, RowContainer: SimpleContainer, Sender: any))
:



OnSelectedItemChanged

(form: pf.Form, args: IItemEventArgs (Control: any, DataItem: any, Parent: any, Sender: any))
:
This event is raised each time a row is selected
Parameter: pf.IItemEventArgs:
Sender: the listbox control
DataItem: the underlying record (it can be null if no row is selected)
Control: the listbox item (a simple container containing the presented row);

Example
var list = form.GetControl("listbox1");
list.OnSelectedItemChanged.Add(function(e) {
var item = e.DataItem;
if (item == null) {
form.GetControl("myLabel").SetValue("[No Item Selected]");
}
else {
form.GetControl("myLabel").SetValue("Item " + item.Name + " selected");
}
});



OnValueChangedFromUI

(form: pf.Form, args: IValueChangedEventArgs (Parent: any, PreviousValue: any, Sender: any, Value: any))
:
Inherited from DataControl.OnValueChangedFromUI




OnValueLoaded

(form: pf.Form, args: IEventArgs (Parent: any, Sender: any))
:
Inherited from DataControl.OnValueLoaded