[This is preliminary documentation and is subject to change.]

Gets or sets the value determining order in which the rows are ordered

Namespace:  Firefly.Box
Assembly:  Firefly.Box (in Firefly.Box.dll) Version: 3.4.23.6473 (3.4.23.6473)

Syntax

C#
public Sort OrderBy { get; set; }
Visual Basic (Declaration)
Public Property OrderBy As Sort
Visual C++
public:
property Sort^ OrderBy {
	Sort^ get ();
	void set (Sort^ value);
}

Remarks

Performance tip - Any OrderBy that is based only on columns that are part of the Task Main Query(*) will be performed by the database.
Otherwise the OrderBy
will be performed in memory, resulting in a performance penalty in cases where many rows are involved
(*)Task Main Query - includes the entity defined in the From property, and any entity that is part of a relation (as defined in the Relations property collection) that is of type Join or OuterJoin

Examples

Using Sort And Reverse Row Order
This example is based on test data. The code for the entities included in this test data can be found in the documentation of Entity
This example uses automatic tools to generate parts of the user interface. Those tools can be found in the example of the documentation of Form
CopyC#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Firefly.Box;

namespace TestFirefly.Box.Documentation
{
    public class ReverseRowOrderDemo
    {
        public void Run()
        {
            var jobs = new Pubs.Jobs();
            jobs.InitializeWithTestData();

            var uic = new UIController()
            {
                From = jobs,
                View = UITools.GenerateFormWithGridFor("Order By And Reversed Row Order",
                                                       "Notice that the rows are ordered by job id, \n"+
                                                       "and that the order is reversed.",
                                                       jobs.Id,
                                                       jobs.Description,
                                                       jobs.MinLevel,
                                                       jobs.MaxLevel)
            };
            uic.OrderBy.Segments.Add(jobs.Id);
            uic.OrderBy.Reversed = true;
            uic.Run();
        }
    }
}

See Also