The requested page is not available for the requested platform. You are viewing the content for Default platform.

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

Declaration

public string UrlFieldName { get; set; }
Public Property UrlFieldName As String

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 { 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