Skip to main content
.NET Framework 4.6.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.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string TextFormatString { get; set; }

Property Value

Type Description
String

A string that represents a caption.

Remarks

In ASP.NET Web Forms applications, an ActionUrl can display link in an additional List View column. Each cell displays a hyperlink associated with the current object/row:

TextFormatString

In this instance, the Action’s ActionBase.Caption property value is displayed as the additional column’s header.

In ASP.NET Core Blazor applications, the ActionUrl associated with a selected List View item displays the link in the column with other actions (in that Action Container).

Text Format String - Blazor

The TextFormatString property specifies column cell display text.

You can insert a property value into the link anchor text. Use ActionUrl.TextFieldName and TextFormatString properties as demonstrated 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

In ASP.NET Web Forms applications, to display Actions in an additional List View column, set ActionBase.SelectionDependencyType to SelectionDependencyType.RequireSingleObject and ActionBase.Category to “RecordEdit”.

In ASP.NET Core Blazor applications, to display an Action in an additional List View column, set ActionBase.SelectionDependencyType to SelectionDependencyType.RequireSingleObject and ActionBase.Category property to ListView, Edit, or RecordEdit. In a List View, the Action is displayed in the same column as other Actions in the same Action Container.

See Also