Skip to main content
.NET Framework 4.5.2+

ActionUrl.TextFormatString Property

Specifies a caption which is used when an ActionUrl is displayed in a List View’s grid editor.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string TextFormatString { get; set; }

Property Value

Type Description
String

A string that represents a caption.

Remarks

When an ActionUrl is related to an object selected in a List View, it can be displayed in an additional cell for each object in the List View’s grid editor:

TextFormatString

In this instance, the Action’s ActionBase.Caption property value is displayed as the additional column’s header. The text displayed in the cells of this column is specified by the TextFormatString property.

You can insert a particular property of the current object in the TextFormatString property value. Specify this property via the ActionUrl.TextFieldName property and specify the TextFormatString property as shown below:

public class DomainObject1 : BaseObject {
   //...
   private string name;
   public string Name {
      get { return name; }
      set { SetPropertyValue(ref name, value); }
   }
}
public partial class ViewController1 : ViewController{
   private void InitializeComponent(){
      //...
      this.urlAction1 = new DevExpress.ExpressApp.Actions.ActionUrl(this.components);
      this.urlAction1.TextFieldName = "Name";
      this.urlAction1.TextFormatString = "Go to {0}'s site";
      //...
   }
}

The following image demonstrates how the urlAction1 from the code above is displayed in the DomainObject1 List View:

TextFormatString2

To display an Action as an additional cell for each object in a List View, set its ActionBase.SelectionDependencyType property to SelectionDependencyType.RequireSingleObject and the ActionBase.Category property - to “RecordEdit”.

See Also