Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    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.v25.1.dll

    NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

    #Declaration

    [DefaultValue("")]
    [DXCategory("Appearance")]
    [XtraSerializableProperty]
    public string NewItemRowText { get; set; }

    #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”.

    image

    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.

    #Example

    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