|
@@ -10,6 +10,7 @@ using System.Windows.Media.Imaging;
|
|
|
using FastReport.Editor;
|
|
|
using InABox.Core;
|
|
|
using Syncfusion.Data;
|
|
|
+using static InABox.DynamicGrid.IDynamicGrid;
|
|
|
using Selection = InABox.Core.Selection;
|
|
|
|
|
|
namespace InABox.DynamicGrid
|
|
@@ -86,9 +87,6 @@ namespace InABox.DynamicGrid
|
|
|
{
|
|
|
Options = new FluentList<DynamicGridOption>();
|
|
|
Options.OnChanged += OptionsChanged;
|
|
|
-
|
|
|
- DefaultOptions = new FluentList<DynamicGridOption>();
|
|
|
- DefaultOptions.OnChanged += DefaultOptions_OnChanged;
|
|
|
|
|
|
RowStyleSelector = GetRowStyleSelector();
|
|
|
RowStyleSelector.GetStyle += (row, style) => GetRowStyle(row, style);
|
|
@@ -112,7 +110,7 @@ namespace InABox.DynamicGrid
|
|
|
/// </summary>
|
|
|
protected void Reconfigure(FluentList<DynamicGridOption> options)
|
|
|
{
|
|
|
- options.BeginUpdate().Clear().AddRange(DefaultOptions);
|
|
|
+ options.BeginUpdate().Clear();
|
|
|
DoReconfigure(options);
|
|
|
OnReconfigure?.Invoke(options);
|
|
|
options.EndUpdate();
|
|
@@ -121,6 +119,11 @@ namespace InABox.DynamicGrid
|
|
|
{
|
|
|
Reconfigure(Options);
|
|
|
}
|
|
|
+ public void Reconfigure(ReconfigureEvent onReconfigure)
|
|
|
+ {
|
|
|
+ OnReconfigure += onReconfigure;
|
|
|
+ Reconfigure();
|
|
|
+ }
|
|
|
|
|
|
public List<Expression<Func<T, object?>>> HiddenColumns { get; }
|
|
|
|
|
@@ -137,7 +140,6 @@ namespace InABox.DynamicGrid
|
|
|
//public abstract bool DirectEdit(CoreTable data);
|
|
|
|
|
|
protected FluentList<DynamicGridOption> Options { get; }
|
|
|
- public FluentList<DynamicGridOption> DefaultOptions { get; }
|
|
|
|
|
|
public DynamicGridColumns MasterColumns { get; protected set; }
|
|
|
public DynamicGridColumns VisibleColumns { get; protected set; }
|