diff --git a/AyCode.Blazor.Components/Components/Grids/MgGridBase.cs b/AyCode.Blazor.Components/Components/Grids/MgGridBase.cs index 37068ea..8aee83b 100644 --- a/AyCode.Blazor.Components/Components/Grids/MgGridBase.cs +++ b/AyCode.Blazor.Components/Components/Grids/MgGridBase.cs @@ -12,13 +12,13 @@ using System.ComponentModel; namespace AyCode.Blazor.Components.Components.Grids; -public interface IMgGridBase +public interface IMgGridBase : IGrid { } -public class MgGridBase : DxGrid, IMgGridBase - where TSignalRDataSource : AcSignalRDataSource> +public abstract class MgGridBase : DxGrid, IMgGridBase + where TSignalRDataSource : AcSignalRDataSource> where TDataItem : class, IId where TId : struct where TLoggerClient : AcLoggerBase @@ -27,14 +27,14 @@ public class MgGridBase : DxG protected bool IsFirstInitializeParameters; private TSignalRDataSource _dataSource = null!; - private IList _dataSourceParam = []; + private List _dataSourceParam = []; private string _gridLogName; public MgGridBase() : base() { } - protected bool HasIdValue(TDataItem dataItem) => _equalityComparer.Equals(dataItem.Id, default);//dataItem.Id.IsNullOrEmpty(); + protected bool HasIdValue(TDataItem dataItem) => !_equalityComparer.Equals(dataItem.Id, default);//dataItem.Id.IsNullOrEmpty(); protected bool IdEquals(TId id1, TId id2) => _equalityComparer.Equals(id1, id2); [Parameter] public TLoggerClient Logger { get; set; } @@ -99,7 +99,7 @@ public class MgGridBase : DxG } set { - _dataSourceParam = value; + _dataSourceParam = value as List; if (_dataSource != null!)// && _dataSourceParam is List workingReferenceList) _dataSource.SetWorkingReferenceList(_dataSourceParam);