UIControllerSortOnIncrementalSearch Property
Gets or sets the value determining if when the user uses the incremental search, the OrderBy will change to match to column the user is searching on.
Namespace: Firefly.BoxAssembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
public bool SortOnIncrementalSearch { get; set; }
Public Property SortOnIncrementalSearch As Boolean
Get
Set
member SortOnIncrementalSearch : bool with get, set
Property Value
Boolean If set to true, when the uses starts the incremental search, the
UIController will search for the first
Sort in the
Indexes property collection of the entity set in the
From property, that start with the Column the user searches on. If such a
Sort was found, the
OrderBy property will be set by it.
Sort on incremental search
This example is based on test data. The code for the entities included in this test data can be found in the documentation of
EntityThis example uses automatic tools to generate parts of the user interface. Those tools can be found in the example of the documentation of
Formusing Firefly.Box;
namespace TestFirefly.Box.Documentation
{
public class SortOnIncrementalSearch
{
public void Run()
{
var employees = new Pubs.Employees();
employees.InitializeWithTestData();
var uic = new UIController()
{
From = employees,
Activity = Activities.Browse,
AllowIncrementalSearch = true, //The Default
SortOnIncrementalSearch = true,//The Default
View = UITools.GenerateFormWithGridFor("Sort On Incremental Search",
"Park on the \"Last Name\" column, and start typing a name, you'll see that \n"+
"the list is now ordered by Last Name.\n"+
"Try the same on \"First Name\", you'll see that the order changes.\n"+
"Now try Searching the ID Column, you'll see that the order by doesn't \n"+
"change, because there is no entry in the indexes collection of the \n"+
"employees entity that starts with the ID Column. ",
employees.Id,
employees.LastName,
employees.MiddleInitial,
employees.FirstName)
};
employees.Indexes.Add(new Sort(employees.LastName));
employees.Indexes.Add(new Sort(employees.FirstName));
uic.Run();
}
}
}