UIControllerForceSaveRow Property
Namespace: Firefly.BoxAssembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
public bool ForceSaveRow { get; set; }
Public Property ForceSaveRow As Boolean
Get
Set
member ForceSaveRow : bool with get, set
Property Value
Boolean
For more information about the default
SavingRow event behavior, see the
SavingRow event documentation.
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
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 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();
}
}
}