All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TreeList.NewItemRowText Property

Gets or sets the text displayed in the New Item Row when it is not focused.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

[DefaultValue("")]
[XtraSerializableProperty]
[DXCategory("Appearance")]
public string NewItemRowText { get; set; }
<DefaultValue("")>
<XtraSerializableProperty>
<DXCategory("Appearance")>
Public Property NewItemRowText As String

Property Value

Type Default Description
String

String.Empty

A string value that specifies the text displayed in the New Item Row when it is not focused.

Remarks

When the New Item Row is located at the top of the list, it displays the default caption — "Click here to add a new row".

You can use the localization service to localize the default text. Use the TreeListStringId.NewItemRowText field to identify the string.

You can also use the TreeList.NewItemRowText property to provide a custom text. This custom text cannot be localized.

See New Item Row for more information.

Examples

The code below shows how to use the localization service to localize the text displayed in the New Item Row. Use the TreeListStringId.NewItemRowText field to identify the string.

using DevExpress.XtraTreeList.Localization;

TreeListLocalizer.Active = new NodeContextMenuLocalizer();

public class NodeContextMenuLocalizer : TreeListLocalizer {
    public override string Language { get { return "English"; } }
    public override string GetLocalizedString(TreeListStringId id) {
        switch (id) {
            case TreeListStringId.NewItemRowText: return "New Node";
            default: return base.GetLocalizedString(id);
        }
    }
}
See Also