1. Control TextItem

    Article: AN0002373Updated: 08.11.2018

    Control, that inserts into the page a text field that is used for editing data.


    Name Description
    int MaxLength Maximum text length. if set to 0, then it is unlimited.
    int MinLength Minimum text length. if set to 0, then it is unlimited.
    int Rows Number of displayed rows. For long texts.
    string DefaultCssClass Deafult CSS class for control.
    void Focus() Method passes focus to control.
    string Text Text value in control.
    string TextCommented Text in comment part of the control.
    string RegularExpression Regular expression for use before control save.
    string RegularExpressionMessage Error message when regular expression is not met.
    object GetData() Function returns text in the textbox.
    void SetData(object value) Function sets text in the textbox.
    string GetDataAsString() Function returns text in the textbox.
    string TextBoxClientId ID of the textbox on client. It is used in Javascript on client.
    string Placeholder Value for placeholder, i.e. text, that displayes if no value is entered.
    bool IsRegimeInsertCommented Indication, whether the text is no mode of adding comments.
    string ID ID of the frame.
    bool Mandatory Indication, whether the value is mandatory.
    bool ReadOnly Indication, whether the control is read-only.
    string Tag Text property for custom use.
    OGItem OGItem Parent OGItem. There is a frame inserted in this OGItem. If NULL is returned, then there is no parent OGItem.


    Script adds a title and textbox into the page.

    gi = OGForm.CreateOGGroup( 'gicontakt', 'Contact data', false, false);
    OGForm.AddControl( gi);

    var r = OGForm.CreateRow();
    var c1 = OGForm.CreateCol(true);
    var ti1 = OGForm.CreateOGTitle('ti1', 'First name and last name', true);
    var t1 = OGForm.CreateOGText( 'tName', true, null);

    c1.Controls.Add( OGForm.CreateItem(ti1, t1));