Table of Contents

Class Control

Namespace
PolarStudio
Assembly
PolarStudio.dll

This class contains one control as is loaded in a form for a web session.

public class Control
Inheritance
Control
Inherited Members
Extension Methods

Fields

ActivateThisControl

This property cen be set to try to automatically activate this control.

public bool ActivateThisControl

Field Value

bool

AllTabsSelected

This property works on tab-controls and shows all controls in all tabs, as if all tabs were selected.

public bool AllTabsSelected

Field Value

bool

BootstrapControlContainerClassesTC

This property gets/sets the classes that are added to div element that will contain the rendered control.

public string BootstrapControlContainerClassesTC

Field Value

string

BootstrapLabelClassesListTC

This property gets/sets the classes that are added to the label (the column heading) of this control in list-view.

public string BootstrapLabelClassesListTC

Field Value

string

BootstrapLabelClassesTC

This property gets/sets the classes that are added to the label of this control in form-view.

public string BootstrapLabelClassesTC

Field Value

string

ControlCssClassesFormTC

This property gets/sets the css classes to apply to this control in form view.

public string ControlCssClassesFormTC

Field Value

string

ControlCssClassesListTC

This property gets/sets the css classes to apply to this control in list view.

public string ControlCssClassesListTC

Field Value

string

PopupSelectItemDataScript

This property can be used to register a script that is used to render the data for a custom PopupSelectItem control. Fill this property only with the name of that script. All parameters are added dynamically, Like: MyPopupSelectItemDataScript for Public Function MyPopupSelectItemDataScript(pContext, pControl, pMaxRecordCount, pFilter, pReturnedDataIsHTMLformatted), Returning array or dictionary of arrays(Value, Caption)

public string PopupSelectItemDataScript

Field Value

string

SuppressTabSheetControlIfOnlyOneTabVisible

Setting this property to True (that only applies to tab controls) will suppress rendering the tab control in form view if only one tab is visible. The controls in that tab will be rendered as normal.

public bool SuppressTabSheetControlIfOnlyOneTabVisible

Field Value

bool

SuppressTabSheetControlInListIfOnlyOneTabVisible

Setting this property to True (that only applies to tab controls) will suppress rendering the tab control in list view if only one tab is visible. The controls in that tab will be rendered as normal.

public bool SuppressTabSheetControlInListIfOnlyOneTabVisible

Field Value

bool

Properties

Application

Returns a reference to the Application for this form (the data layer)

public BudaApplication Application { get; }

Property Value

BudaApplication

This property gets/sets the feature to automatically create a 'follow link' button on foreign keys.

public bool AutoCreateFollowLink { get; set; }

Property Value

bool

BPserver

Returns a reference to the BPserver (the presentation layer).

public BPserver BPserver { get; }

Property Value

BPserver

BootstrapControlContainerWidth

This property gets/sets the width of the control container for this control in bootstrap columns. This must be a value from 1-12. Values 0/-1 mean 'all the rest available'.

public int BootstrapControlContainerWidth { get; set; }

Property Value

int

BootstrapLabelWidth

This property gets/sets the width of the label for this control in bootstrap columns. This must be a value from 1-12.

public int BootstrapLabelWidth { get; set; }

Property Value

int

BudaSession

Returns a reference to the BudaSession (the data layer)

public BudaSession BudaSession { get; }

Property Value

BudaSession

CaptionAboveField

This property gets/sets if the caption is to be rendered above the control or left of the control. It only applies to form view.

public bool CaptionAboveField { get; set; }

Property Value

bool

CaptionListViewTC

This property gets/sets the caption (as text code) for the control in list view. If this caption is empty, the 'normal' caption is used.

public string CaptionListViewTC { get; set; }

Property Value

string

CaptionStyle

Returns the style object that keeps all style settings for the caption of this control

public Style CaptionStyle { get; }

Property Value

Style

CaptionTC

This property gets/sets the caption (as text code) for the control.

public string CaptionTC { get; set; }

Property Value

string

ControlID

Returns the SysControlID for this control in the repository.

public int ControlID { get; }

Property Value

int

ControlSubType

Returns the sub-type for the control. Specifically for Tabsheet and Area controls, you may be interested in subtype 'START'.

public string ControlSubType { get; }

Property Value

string

ControlType

Returns the control type for this control as string, like 'TEXTBOX', 'TABSHEET', 'AREA', 'DROPDOWN', 'BUTTON', etc.

public string ControlType { get; }

Property Value

string

CssClassHTML

This property gets/sets the html classes for this control.

public string CssClassHTML { get; }

Property Value

string

CustomControlObject

This property gets/sets a CustomControlObject. This object can be any type of object that implements a Render-method as: Render(pContext, pControl, pResult, pHTMLfieldName, pListView)

public object CustomControlObject { get; set; }

Property Value

object

CustomControlScript

This property gets/sets the script-expresion as is used for a custom control.

public string CustomControlScript { get; set; }

Property Value

string

DataSet

Returns the dataset this form is bound to (for bound forms).

public BudaDataSet DataSet { get; }

Property Value

BudaDataSet

DisplayValue

Returns the display value of the control as is to be shown to the user.

public string DisplayValue { get; }

Property Value

string

EditAllowed

This property can be used to make unbound controls read-only. For bound controls, this property is read only and returns the EditAllowed result of the bound field.

public bool EditAllowed { get; set; }

Property Value

bool

Engine

Returns a reference to the engine (the data layer)

public BudaEngine Engine { get; }

Property Value

BudaEngine

ExplanationTC

This property gets/sets the explanation (as text code) for the control.

public string ExplanationTC { get; set; }

Property Value

string

Field

Returns the field this control is bound to (if applicable)

public BudaField Field { get; }

Property Value

BudaField

FieldName

Returns the name of the bound field (if available).

public string FieldName { get; }

Property Value

string

FieldSentToBrowser

This property gets/sets if the field is sent to the browser. Only fields that are actually sent to the browser can be updated when the form is posted back to the server. This property can be set in a render control script. If not, the system will try to automatically determine if the fields is sent to the browser.

public bool FieldSentToBrowser { get; set; }

Property Value

bool

FieldValueError

This property gets/sets the FieldValueError. This means the control is shown with a colored background. For field bound controls, this property works directly on the related field. For unbound controls, this property is kept locally. Please be aware that for unbound controls, this property is not automatically cleared, as is done with fields.

public bool FieldValueError { get; set; }

Property Value

bool

FollowLinkAllowed

This property gets/sets if the user is allowed to follow a link for a foreign key.

public bool FollowLinkAllowed { get; set; }

Property Value

bool

FollowLinkHTML

This method creates the html for a follow link for this control.

public string FollowLinkHTML { get; }

Property Value

string

FollowLinkWanted

This property is set during the render of a control and can be used by a custom foreign key control to know if the FollowLink is to be rendered or not.

public bool FollowLinkWanted { get; }

Property Value

bool

Form

Returns a reference to the form this control is part of.

public Form Form { get; }

Property Value

Form

FullHtmlTC

This property gets/sets the FullHtmlTC. The meaning of this property depends on the control type.

public string FullHtmlTC { get; set; }

Property Value

string

GroupCalculationAction

This property gets/sets the group calculation action for this control in list view. Use one of: '@SUM', '@MIN', '@MAX', '@AVG', '@COUNT', '@CAPTION' or use a script expression for a custom result.

public string GroupCalculationAction { get; set; }

Property Value

string

GroupCalculationDecimalPlaces

This property gets/sets the number of decimal places for the group calculation for this control.

public object GroupCalculationDecimalPlaces { get; set; }

Property Value

object

GroupCalculationThousandsSeparator

This property gets/sets if the group calculation must use thousand separators.

public bool GroupCalculationThousandsSeparator { get; set; }

Property Value

bool

HTMLfieldName

This property is only available during the rendering of a control and contains the full name for the html for this control.

public string HTMLfieldName { get; }

Property Value

string

HasExplanation

Returns true if this field has an explanation.

public bool HasExplanation { get; }

Property Value

bool

Height

This property gets/sets the height of the control in form view. It depends on the rendering of the control what the effect is for this property.

public int Height { get; set; }

Property Value

int

HeightInListView

This property gets/sets the height of the control in list view. It depends on the rendering of the control what the effect is for this property.

public int HeightInListView { get; set; }

Property Value

int

InFilterForm

This property gets/sets if the control is visible in the filter form.

public bool InFilterForm { get; set; }

Property Value

bool

IsFormLayoutItem

Returns True for FormLayoutItem controls.

public bool IsFormLayoutItem { get; }

Property Value

bool

KeepWithPrevious

This property gets/sets if this control is to be rendered on the same line as the previous control in form view (instead of below the previous control).

public bool KeepWithPrevious { get; set; }

Property Value

bool

KeepWithPreviousInListView

This property gets/sets if this control is to be rendered in the same cell in list view (instead of in a next cell)

public bool KeepWithPreviousInListView { get; set; }

Property Value

bool

LimitForeignKeyOptionsInSearch

This property gets/sets the feature to limit the list of options when filtering for foreign keys (only applicable values are shown). Only works for field bound controls for a foreign key.

public bool LimitForeignKeyOptionsInSearch { get; set; }

Property Value

bool

MessagesProfile

Returns the MessagesProfile for the current session.

public string MessagesProfile { get; }

Property Value

string

Name

Returns the name of the control.

public string Name { get; }

Property Value

string

NoRecordsToDisplayTextTC

This property can be used to set a specific message for (old style) related item list controls for when no records are to be shown.

public string NoRecordsToDisplayTextTC { get; set; }

Property Value

string

ParentControl

Returns a reference to the parent control (if available)

public Control ParentControl { get; }

Property Value

Control

ParentVisible

Returns True if all of the the parent controls are visible.

public bool ParentVisible { get; }

Property Value

bool

QuickInsertParentAllowed

This property gets/sets if QuickInsertParent is allowed. This property can be set from script, but only modified from 'Allowed' to 'Not allowed'

public bool QuickInsertParentAllowed { get; }

Property Value

bool

ReRenderRequested

Returns True if this control is to be re-rendered.

public bool ReRenderRequested { get; }

Property Value

bool

Relationship

Returns the relationship (for related tables) the control is bound to (if applicable).

public repRelationship Relationship { get; }

Property Value

repRelationship

RepostFormOnChange

This property gets/sets if this control will trigger a repost of the form when the value is changed.

public bool RepostFormOnChange { get; set; }

Property Value

bool

Required

This property gets/sets if the control is required. For field bound controls, this property is propagated to the field, for unbound controls, this property is kept within the control.

public bool Required { get; set; }

Property Value

bool

RightAligned

Used to align the contents of text fields to the right.

public bool RightAligned { get; set; }

Property Value

bool

Script

This property gets/sets the script as is it set in the Polar Studio repository for this control. This script can be used to execute an on-click for a button or to render the control for a script-control. It can be overruled (for rendering) by the CustomControlScript property.

public string Script { get; set; }

Property Value

string

ScriptedFilterControl

This property gets/sets if the custom control script is to be used for filter controls or that the filter control should use the default rendering for that field type.

public bool ScriptedFilterControl { get; set; }

Property Value

bool

Session

Returns a reference to the web session (the presentation layer)

public Session Session { get; }

Property Value

Session

Settings

Returns the settings of this control as set in the repository.

public repControl Settings { get; }

Property Value

repControl

SettingsForGroup

Returns the group specific settings of this control as set in the repository for the group of the current user.

public repControlSettings SettingsForGroup { get; }

Property Value

repControlSettings

ShowRelatedTableInsertButton

Returns true if the user is allowed to insert data in the related table (only for controls bound to a relationship).

public bool ShowRelatedTableInsertButton { get; set; }

Property Value

bool

Style

Returns the style object that keeps all style settings for the control

public Style Style { get; }

Property Value

Style

SubControls

Returns all sub controls for this control (for example for a tab sheet or an area).

public Controls SubControls { get; }

Property Value

Controls

SubControls_Interactive

Returns all sub controls for this control, but excluded END-controls and controls that are not visible.

public Controls SubControls_Interactive { get; }

Property Value

Controls

TabSelected

This property applies to tab sheet controls. It returns true if the tab sheet is activated or can be set to true to activate the tabsheet.

public bool TabSelected { get; set; }

Property Value

bool

Tag

The Tag is available for scripted use and can be filled with any text.

public string Tag { get; set; }

Property Value

string

Value

This property gets/sets the value of a control. For field bound controls, this will be the value of the field. For unbound controls, this is always treated as a string value.

public object Value { get; set; }

Property Value

object

ViewAllowed

Returns True if the control is visible and the bound field is ViewAllowed. It also takes the state-specific view settings for unbound controls into account. For unbound controls, this property is read/write.

public bool ViewAllowed { get; set; }

Property Value

bool

ViewColumnAllowed

Returns True if the user is allowed to view the column.

public bool ViewColumnAllowed { get; }

Property Value

bool

ViewForm

This property gets/sets if the control is shown in form view.

public bool ViewForm { get; set; }

Property Value

bool

ViewFormPrint

This property gets/sets if the control is shown in form view for printing.

public bool ViewFormPrint { get; set; }

Property Value

bool

ViewList

This property gets/sets if the control is shown in list view.

public bool ViewList { get; set; }

Property Value

bool

ViewListPrint

This property gets/sets if the control is shown in list view for printing.

public bool ViewListPrint { get; set; }

Property Value

bool

Visible

This property is to make controls not-visible in script. By default this property is True for all controls (regardless permissions and view-settings). In script, the Visible property can be set to False to hide the control.

public bool Visible { get; set; }

Property Value

bool

VisibleControl

Returns True if this control has a user interface. Some controls (like an Area-End) are a control, but have no user interface.

public bool VisibleControl { get; }

Property Value

bool

VisibleScript

This property gets/sets the script that can determine if this control is visible.

public string VisibleScript { get; set; }

Property Value

string

Width

This property gets/sets the width of the control in form view. It depends on the rendering of the control what the effect is for this property.

public int Width { get; set; }

Property Value

int

WidthInListView

This property gets/sets the width of the control in list view. It depends on the rendering of the control what the effect is for this property.

public int WidthInListView { get; set; }

Property Value

int

WrapCaption

This property gets/sets if the caption can wrap or not.

public bool WrapCaption { get; set; }

Property Value

bool

WrapSelectItem

This property sets if long text values as shown in SelectItems are wrapping or not.

public bool WrapSelectItem { get; set; }

Property Value

bool

Methods

BlobHTML(object, bool, bool, object, object)

This method returns the HTML to create the blob control.

public string BlobHTML(object pReturnAsInline = null, bool pSuppressDetailsAnchor = false, bool pSuppressDownloadAnchor = false, object pWidth = null, object pHeight = null)

Parameters

pReturnAsInline object

This optional boolean parameter can set if the blob is to be shown as an inline image (True, in case of an image) or an icon (False). Leave empty to use the default for this control.

pSuppressDetailsAnchor bool

This parameter can be set to True to disable the 'View details' button for this blob.

pSuppressDownloadAnchor bool

This parameter can be set to True to suppress a download anchor.

pWidth object

This optional property can contain the width in pixels to show an inline image.

pHeight object

This optional property can contain the height in pixels to show an inline image.

Returns

string

The html for this blob control.

CancelReRender()

This method clears the ReRenderRequested flag for this control. This is for if you want to suppress the re-render of a control that has just been updated and interactively sent to the server

public void CancelReRender()

CaptionHTML(int, bool, bool)

This method returns the html to use for the caption of this control, given the parameters.

public string CaptionHTML(int pLanguageID, bool pListView = false, bool pAddExplanation = false)

Parameters

pLanguageID int

The LanguageID to use

pListView bool

Is the form currently in ListView.

pAddExplanation bool

Must the explanation for the control be added.

Returns

string

The caption for this control.

ControlIsVisible(bool, bool)

This method determines if a control is visible for the given parameters. It takes all factors into account, like permissions, visibility of tabs, etc.

public bool ControlIsVisible(bool pFormInListView = false, bool pDetermineForIfTabSelected = false)

Parameters

pFormInListView bool

Pass as True to know if the control is visible in listview.

pDetermineForIfTabSelected bool

Pass as True of know if the control is visible if it's containing tabsheet were selected.

Returns

bool

A boolean indicating the control is visible

ExplanationHTML(int)

This method returns the html for the explanation for this control in the given LanguageID.

public string ExplanationHTML(int pLanguageID = -1)

Parameters

pLanguageID int

The LanguageID to use.

Returns

string

The html for the explanation of this control.

FileUploadControlHTML()

This method returns the HTML to create a file upload control for this control. It will also make sure the current request will use multi-part encoding as is required for file controls.

public string FileUploadControlHTML()

Returns

string

The html for a file upload control.

GetContext()

This method returns the context for this control to use for ScriptEvaluate functions.

public Context GetContext()

Returns

Context

The context for this control.

GetGroupResult(string)

Used in list views with columns (controls) that are performing group calculations.

public object GetGroupResult(string pFunction = "")

Parameters

pFunction string

The function to perform for this control/column. Use one of: '@SUM', '@MIN', '@MAX', '@AVG', '@COUNT'

Returns

object

GiveGroupCalculation2CaptionHTML(int)

This method returns the caption for the Group Calculation (totals)

public string GiveGroupCalculation2CaptionHTML(int pLanguageID)

Parameters

pLanguageID int

The LanguageID to use.

Returns

string

The caption.

GiveGroupCalculationCaptionHTML(int)

This method returns the caption for the Group Calculation (sub totals)

public string GiveGroupCalculationCaptionHTML(int pLanguageID)

Parameters

pLanguageID int

The LanguageID to use.

Returns

string

The caption.

ReRender()

This method will mark this control as to be re-rendered for interactive forms.

public void ReRender()