ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / SpatialMapSeries Class / SortAscending Property
Example

In This Topic
    SortAscending Property (SpatialMapSeries)
    In This Topic
    Gets or sets if values based on the sort field are in ascending order.
    Syntax
    public bool SortAscending {get; set;}
    Public Property SortAscending As Boolean

    Property Value

    Type: String
    Remarks
    Optional. Default is ascending order. Returns true if in ascending order.
    Example
    Modify an existing map series
    {
      //Modify the currently active map series and changes its sort field and page number field.
      await QueuedTask.Run(() =>
      {
        SpatialMapSeries SMS = layout.MapSeries as SpatialMapSeries; //cast as spatial map series for additional members
        SMS.SortField = "State_Name";
        SMS.SortAscending = true;
        SMS.PageNumberField = "PageNum";
    
        //Overwrite the current map series with these new settings
        layout.SetMapSeries(SMS);
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also