UIControllerAllowSelect Property

Gets or sets the value determining If the SelectCommand is enabled for the UIController


Namespace: Firefly.Box
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
public bool AllowSelect { get; set; }

Property Value



Mostly used to implement selection lists
When the SelectCommand is enabled, and raised, the UIController will perform this SavingRow event, and exit.
The SelectCommand can be triggered by double clicking on any control on the form, or by it's keyboard shortcut (the default is the Enter key).


using select
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
using System.Windows.Forms;
using Firefly.Box;
namespace TestFirefly.Box.Documentation
    public class DemoSelect
        public void Run()
            var jobs = new Pubs.Jobs();

            var uic = new UIController
                From = jobs,
                Activity = Activities.Browse,
                AllowSelect = true,
                View = UITools.GenerateFormWithGridFor("Select Demo",
                                                       "Select the current value by one of the following methods:\n" +
                                                       "Click the select button.\n" +
                                                       "Press the enter key.\n" +
                                                       "Double Click on any control.",
            var selectButton = new Button
                Text = "Select"
            selectButton.Click += (a, b) => uic.Raise(Command.Select);
            UITools.AddControlsToForm(uic.View, selectButton);

            uic.SavingRow += ( b) => MessageBox.Show("The selected value is " + jobs.Id.ToString().Trim());

See Also