Tab
A newer version of this page is available. Switch to the current version.

TextEditProperties.SelectInputTextOnClick Property

Specifies whether to select all text within the editor's input when it is focused.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(false)]
public bool SelectInputTextOnClick { get; set; }
<DefaultValue(False)>
Public Property SelectInputTextOnClick As Boolean

Property Value

Type Default Description
Boolean

false

true, to select all text within the editor's input on focus; otherwise, false.

Remarks

The following example illustrates how to use the SelectInputTextOnClick property.


<dx:ASPxFormLayout runat="server" ID="fl">
            <Items>
                <dx:LayoutItem Caption="Text Box">
                    <LayoutItemNestedControlCollection>
                        <dx:LayoutItemNestedControlContainer>
                            <dx:ASPxTextBox runat="server" ID="textBox" SelectInputTextOnClick="true">                                
                            </dx:ASPxTextBox>
                        </dx:LayoutItemNestedControlContainer>
                    </LayoutItemNestedControlCollection>
                </dx:LayoutItem>
                <dx:LayoutItem Caption="Password Text Box">
                    <LayoutItemNestedControlCollection>
                        <dx:LayoutItemNestedControlContainer>
                            <dx:ASPxTextBox runat="server" Password="true" ID="passwordTextBox" SelectInputTextOnClick="true">                                
                            </dx:ASPxTextBox>
                        </dx:LayoutItemNestedControlContainer>
                    </LayoutItemNestedControlCollection>
                </dx:LayoutItem>
                <dx:LayoutItem Caption="Date Edit">
                    <LayoutItemNestedControlCollection>
                        <dx:LayoutItemNestedControlContainer>
                            <dx:ASPxDateEdit runat="server" ClearButton-DisplayMode="Always" ID="dateEdit" SelectInputTextOnClick="true" Date="2018-1-1">                                
                            </dx:ASPxDateEdit>
                        </dx:LayoutItemNestedControlContainer>
                    </LayoutItemNestedControlCollection>
                </dx:LayoutItem>
                <dx:LayoutItem Caption="Combo Box">
                    <LayoutItemNestedControlCollection>
                        <dx:LayoutItemNestedControlContainer>
                            <dx:ASPxComboBox runat="server" ClearButton-DisplayMode="Always" ID="comboBox" SelectInputTextOnClick="true">
                                <Items>
                                    <dx:ListEditItem Text="Item 1" Value="1" />
                                    <dx:ListEditItem Text="Item 2" Value="2" />
                                    <dx:ListEditItem Text="Item 3" Value="3" />
                                </Items>                                
                            </dx:ASPxComboBox>
                        </dx:LayoutItemNestedControlContainer>
                    </LayoutItemNestedControlCollection>
                </dx:LayoutItem>
                <dx:LayoutItem Caption="">
                    <LayoutItemNestedControlCollection>
                        <dx:LayoutItemNestedControlContainer>
                            <dx:ASPxButton runat="server" Text="Submit" />
                        </dx:LayoutItemNestedControlContainer>
                    </LayoutItemNestedControlCollection>
                </dx:LayoutItem>
            </Items>
        </dx:ASPxFormLayout>   
NOTE

The SelectInputTextOnClick property synchronizes its value with the editor's ASPxTextEdit.SelectInputTextOnClick property.

See Also