Skip to main content
.NET Framework 4.5.2+

ActionUrl.UrlFieldName Property

Specifies the name of a persistent object’s property whose value is used to build a URL text based on the ActionUrl.UrlFormatString property value.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string UrlFieldName { get; set; }

Property Value

Type Description
String

A string value representing a persistent object’s property specifying a URL.

Remarks

An ActionUrl Action can be used to load a page specified by a particular property of a persistent object.The following code demonstrates how this is done:

public class DomainObject1 : BaseObject {
   //...
   private string webSite;
   public string WebSite {
      get { return webSite; }
      set { SetPropertyValue(ref webSite, value); }
   }
}
public partial class ViewController1 : ViewController{
   private void InitializeComponent(){
      //...
      this.urlAction1 = new DevExpress.ExpressApp.Actions.ActionUrl(this.components);
      this.urlAction1.UrlFieldName = "WebSite";
      this.urlAction1.UrlFormatString = "http://{0}";
      //...
   }
}

In this instance, the ActionUrl should be activated in a Detail View or for each object in a List View. To do that, set the ActionBase.SelectionDependencyType property to SelectionDependencyType.RequireSingleObject and the ActionBase.Category property to “RecordEdit”. In a List View, the Action will be displayed in an additional cell for each object.

TextFormatString2

To learn how to specify a caption for an ActionUrl, refer to the ActionUrl.TextFormatString property definition.

If the UrlFieldName property is not empty, the Action’s ActionBase.SelectionDependencyType property is set to the SelectionDependencyType.RequireSingleObject value. So, to make this Action available for a List View, the Action Container specified by its ActionBase.Category should be contained in the required Template, and the List View must have a single selected object.

See Also