Class DetailsViewNotifyListener
class used to listen the property changed and collection changed in the DetailsViewDataGrid and SourceDataGrid, then send the notification to others.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grid
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class DetailsViewNotifyListener : Object, IDetailsViewNotifyListener, IDisposable
Constructors
DetailsViewNotifyListener(SfDataGrid)
Initializes a new instance of DetailsViewNotifyListener with source datagrid.
Declaration
public DetailsViewNotifyListener(SfDataGrid sourceDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sourceDataGrid | The Corresponding SfDataGrid. |
DetailsViewNotifyListener(SfDataGrid, SfDataGrid)
Initializes a new instance of DetailsViewNotifyListener with source datagrid and parent datagrid.
Declaration
public DetailsViewNotifyListener(SfDataGrid sourceDataGrid, SfDataGrid parentDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sourceDataGrid | The specific source datagrid. |
SfDataGrid | parentDataGrid | The specific parent datagrid. |
Properties
SourceDataGrid
SourceDataGrid - SfDataGrid placed in the GridViewDefinition
Declaration
public SfDataGrid SourceDataGrid { get; }
Property Value
Type |
---|
SfDataGrid |
Methods
CopyPropertiesFromSourceDataGrid(SfDataGrid)
Method which creates DetailsViewDataGrid and Copy Properties from SourceDataGrid to DetailsViewDataGrid
Declaration
public DetailsViewDataGrid CopyPropertiesFromSourceDataGrid(SfDataGrid sourceDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sourceDataGrid | Source DataGrid |
Returns
Type | Description |
---|---|
DetailsViewDataGrid | DetailsViewDataGrid |
Dispose()
Disposes all the resources used by the DetailsViewNotifyListener class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the DetailsViewNotifyListener class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
EnsureCollection<T, S>(T, Func<SfDataGrid, T>, Func<S, S, Boolean>, IDetailsViewNotifier)
Ensures the Collection.
Declaration
public void EnsureCollection<T, S>(T source, Func<SfDataGrid, T> target, Func<S, S, bool> predicate, IDetailsViewNotifier notifier)
where T : IList<S>
Parameters
Type | Name | Description |
---|---|---|
T | source | The Specified Source. |
System.Func<SfDataGrid, T> | target | The Specified target. |
System.Func<S, S, System.Boolean> | predicate | The corrsponding predicate. |
IDetailsViewNotifier | notifier | The Specified IDetailsViewNotifier. |
Type Parameters
Name |
---|
T |
S |
GetParentDataGrid()
Gets the Parent data grid.
Declaration
public SfDataGrid GetParentDataGrid()
Returns
Type | Description |
---|---|
SfDataGrid | The parent data grid. |
NotifyCollectionChanged(Object, NotifyCollectionChangedEventArgs, Func<SfDataGrid, Object>, IDetailsViewNotifier, Type)
When collection is chnaged If it is SourceDataGrid then we will update the collection to all the cloned child grids(DetailsViewDataGrids). If it is cloned child grid(DetailsViewDataGrid), then we will change the property to the SourceDataGrid, it will change the property to other cloned child grid(DetailsViewDataGrids) using ClonedDataGrid list.
Declaration
public void NotifyCollectionChanged(object source, NotifyCollectionChangedEventArgs e, Func<SfDataGrid, object> target, IDetailsViewNotifier notifier, Type baseType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | |
System.Func<SfDataGrid, System.Object> | target | |
IDetailsViewNotifier | notifier | |
System.Type | baseType |
NotifyCollectionPropertyChanged(IDetailsViewNotifier, Type)
When SortColumnDescriptions, GroupColumnDescriptions are changed, need to update this for other DetailsViewDataGrids
Declaration
public void NotifyCollectionPropertyChanged(IDetailsViewNotifier notifier, Type baseType)
Parameters
Type | Name | Description |
---|---|---|
IDetailsViewNotifier | notifier | DataGrid(SourceDataGrid/ DetailsViewDataGrid) which notfifies the changes |
System.Type | baseType | collection type |
NotifyPropertyChanged(Object, String, DependencyPropertyChangedEventArgs, Func<SfDataGrid, Object>, IDetailsViewNotifier, Type)
When property is changed If it is SourceDataGrid then we will change the property to all the cloned child grids(DetailsViewDataGrids). If it is cloned child grid(DetailsViewDataGrid), then we will change the property to the SourceDataGrid, it will change the property to other cloned child grid using ClonedDataGrid list.
Declaration
public void NotifyPropertyChanged(object source, string propertyName, DependencyPropertyChangedEventArgs e, Func<SfDataGrid, object> target, IDetailsViewNotifier notifier, Type ownerType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | |
System.String | propertyName | |
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | e | |
System.Func<SfDataGrid, System.Object> | target | |
IDetailsViewNotifier | notifier | |
System.Type | ownerType |
ProcessCollectionChanged(NotifyCollectionChangedEventArgs, IList, IList, Type)
Copying the collection changes to other DetailsViewDataGrids/ SourceDataGrid
Declaration
public static void ProcessCollectionChanged(NotifyCollectionChangedEventArgs e, IList source, IList target, Type baseType)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | |
System.Collections.IList | source | |
System.Collections.IList | target | |
System.Type | baseType |