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
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
BootstrapControlContainerClassesTC
This property gets/sets the classes that are added to div element that will contain the rendered control.
public string BootstrapControlContainerClassesTC
Field Value
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
BootstrapLabelClassesTC
This property gets/sets the classes that are added to the label of this control in form-view.
public string BootstrapLabelClassesTC
Field Value
ControlCssClassesFormTC
This property gets/sets the css classes to apply to this control in form view.
public string ControlCssClassesFormTC
Field Value
ControlCssClassesListTC
This property gets/sets the css classes to apply to this control in list view.
public string ControlCssClassesListTC
Field Value
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
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
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
Properties
Application
Returns a reference to the Application for this form (the data layer)
public BudaApplication Application { get; }
Property Value
AutoCreateFollowLink
This property gets/sets the feature to automatically create a 'follow link' button on foreign keys.
public bool AutoCreateFollowLink { get; set; }
Property Value
BPserver
Returns a reference to the BPserver (the presentation layer).
public BPserver BPserver { get; }
Property Value
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
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
BudaSession
Returns a reference to the BudaSession (the data layer)
public BudaSession BudaSession { get; }
Property Value
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
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
CaptionStyle
Returns the style object that keeps all style settings for the caption of this control
public Style CaptionStyle { get; }
Property Value
CaptionTC
This property gets/sets the caption (as text code) for the control.
public string CaptionTC { get; set; }
Property Value
ControlID
Returns the SysControlID for this control in the repository.
public int ControlID { get; }
Property Value
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
ControlType
Returns the control type for this control as string, like 'TEXTBOX', 'TABSHEET', 'AREA', 'DROPDOWN', 'BUTTON', etc.
public string ControlType { get; }
Property Value
CssClassHTML
This property gets/sets the html classes for this control.
public string CssClassHTML { get; }
Property Value
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
CustomControlScript
This property gets/sets the script-expresion as is used for a custom control.
public string CustomControlScript { get; set; }
Property Value
DataSet
Returns the dataset this form is bound to (for bound forms).
public BudaDataSet DataSet { get; }
Property Value
DisplayValue
Returns the display value of the control as is to be shown to the user.
public string DisplayValue { get; }
Property Value
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
Engine
Returns a reference to the engine (the data layer)
public BudaEngine Engine { get; }
Property Value
ExplanationTC
This property gets/sets the explanation (as text code) for the control.
public string ExplanationTC { get; set; }
Property Value
Field
Returns the field this control is bound to (if applicable)
public BudaField Field { get; }
Property Value
FieldName
Returns the name of the bound field (if available).
public string FieldName { get; }
Property Value
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
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
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
FollowLinkHTML
This method creates the html for a follow link for this control.
public string FollowLinkHTML { get; }
Property Value
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
Form
Returns a reference to the form this control is part of.
public Form Form { get; }
Property Value
FullHtmlTC
This property gets/sets the FullHtmlTC. The meaning of this property depends on the control type.
public string FullHtmlTC { get; set; }
Property Value
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
GroupCalculationDecimalPlaces
This property gets/sets the number of decimal places for the group calculation for this control.
public object GroupCalculationDecimalPlaces { get; set; }
Property Value
GroupCalculationThousandsSeparator
This property gets/sets if the group calculation must use thousand separators.
public bool GroupCalculationThousandsSeparator { get; set; }
Property Value
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
HasExplanation
Returns true if this field has an explanation.
public bool HasExplanation { get; }
Property Value
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
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
InFilterForm
This property gets/sets if the control is visible in the filter form.
public bool InFilterForm { get; set; }
Property Value
IsFormLayoutItem
Returns True for FormLayoutItem controls.
public bool IsFormLayoutItem { get; }
Property Value
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
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
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
MessagesProfile
Returns the MessagesProfile for the current session.
public string MessagesProfile { get; }
Property Value
Name
Returns the name of the control.
public string Name { get; }
Property Value
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
ParentControl
Returns a reference to the parent control (if available)
public Control ParentControl { get; }
Property Value
ParentVisible
Returns True if all of the the parent controls are visible.
public bool ParentVisible { get; }
Property Value
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
ReRenderRequested
Returns True if this control is to be re-rendered.
public bool ReRenderRequested { get; }
Property Value
Relationship
Returns the relationship (for related tables) the control is bound to (if applicable).
public repRelationship Relationship { get; }
Property Value
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
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
RightAligned
Used to align the contents of text fields to the right.
public bool RightAligned { get; set; }
Property Value
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
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
Session
Returns a reference to the web session (the presentation layer)
public Session Session { get; }
Property Value
Settings
Returns the settings of this control as set in the repository.
public repControl Settings { get; }
Property Value
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
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
Style
Returns the style object that keeps all style settings for the control
public Style Style { get; }
Property Value
SubControls
Returns all sub controls for this control (for example for a tab sheet or an area).
public Controls SubControls { get; }
Property Value
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
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
Tag
The Tag is available for scripted use and can be filled with any text.
public string Tag { get; set; }
Property Value
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
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
ViewColumnAllowed
Returns True if the user is allowed to view the column.
public bool ViewColumnAllowed { get; }
Property Value
ViewForm
This property gets/sets if the control is shown in form view.
public bool ViewForm { get; set; }
Property Value
ViewFormPrint
This property gets/sets if the control is shown in form view for printing.
public bool ViewFormPrint { get; set; }
Property Value
ViewList
This property gets/sets if the control is shown in list view.
public bool ViewList { get; set; }
Property Value
ViewListPrint
This property gets/sets if the control is shown in list view for printing.
public bool ViewListPrint { get; set; }
Property Value
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
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
VisibleScript
This property gets/sets the script that can determine if this control is visible.
public string VisibleScript { get; set; }
Property Value
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
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
WrapCaption
This property gets/sets if the caption can wrap or not.
public bool WrapCaption { get; set; }
Property Value
WrapSelectItem
This property sets if long text values as shown in SelectItems are wrapping or not.
public bool WrapSelectItem { get; set; }
Property Value
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
objectThis 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
boolThis parameter can be set to True to disable the 'View details' button for this blob.
pSuppressDownloadAnchor
boolThis parameter can be set to True to suppress a download anchor.
pWidth
objectThis optional property can contain the width in pixels to show an inline image.
pHeight
objectThis 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
intThe LanguageID to use
pListView
boolIs the form currently in ListView.
pAddExplanation
boolMust 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
boolPass as True to know if the control is visible in listview.
pDetermineForIfTabSelected
boolPass 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
intThe 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
stringThe function to perform for this control/column. Use one of: '@SUM', '@MIN', '@MAX', '@AVG', '@COUNT'
Returns
GiveGroupCalculation2CaptionHTML(int)
This method returns the caption for the Group Calculation (totals)
public string GiveGroupCalculation2CaptionHTML(int pLanguageID)
Parameters
pLanguageID
intThe 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
intThe 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()