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

Forces the UIController to perform the SavingRow event, when the user leaves the row. Overrides the default SavingRow event rules

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

Syntax

C#
public bool ForceSaveRow { get; set; }
Visual Basic (Declaration)
Public Property ForceSaveRow As Boolean
Visual C++
public:
property bool ForceSaveRow {
	bool get ();
	void set (bool value);
}

Remarks

For more information about the default SavingRow event behavior, see the SavingRow event documentation.

Examples

leave row
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.Windows.Forms;
using Firefly.Box;

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

            var uic = new UIController
                          {
                              From = jobs,
                              View = UITools.GenerateFormWithGridFor("SavingRow Demo",
                                                                     "Notice that the SavingRow event only happens for rows\n" +
                                                                     "That were, or if the ForceSaveRow checkbox is set.",
                                                       jobs.Id,
                                                       jobs.Description)
                          };

            var forceLeaveRowCheckBox = new CheckBox
                                            {
                                                Text = "Force Leave Row",
                                                Width = 120,
                                                Checked = uic.ForceSaveRow
                                            };
            forceLeaveRowCheckBox.CheckedChanged += (a, b) => uic.ForceSaveRow = forceLeaveRowCheckBox.Checked;

            UITools.AddControlsToForm(uic.View, forceLeaveRowCheckBox);

            uic.SavingRow += ( b) => MessageBox.Show("Leave Row Happened");

            uic.Run();
        }
    }
}

See Also