Class SourceListSet
Implements the collection that is only meant to be initialized at run-time. It does not support design-time. It also does not raise events when it is changed; it should be setup only once after Engine.SetSourceList is called. It listens to the engine.SourceListChanged event and checks if it can get to a "DataSet". If that is the case, then the DataSet.Tables collection is copied over.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class SourceListSet : ICollection, IEnumerable, IDisposable, IStandardValuesProvider
Constructors
SourceListSet(Engine)
Initializes a new instance of SourceListSet that belongs to the specified engine.
Declaration
public SourceListSet(Engine engine)
Parameters
Type | Name | Description |
---|---|---|
Engine | engine | The engine this set belongs to. |
Fields
Empty
A Read-only empty collection.
Declaration
public static readonly SourceListSet Empty
Field Value
Type |
---|
SourceListSet |
Properties
ClearAllWhenEngineSourceListChanged
Gets or sets a value indicating whether the SourceListSet will be cleared itself when add new data source. When you assign a new data source to the Engine, the SourceListSet still holds references to the previous list. When this property is True, the SourceListSet will check if the new data source has an entry in the SourceListSet. If it is a new DataSource, the SourceListSet will clear itself and then add the new data source. This is necessary to avoid memory leaks. If the clear causes problems (e.g. a Relation does not show up), you can force the SourceListSet never to clear its contents when the Engine.SetSourceList is called or Engine.DataSource is changed.
Declaration
public bool ClearAllWhenEngineSourceListChanged { get; set; }
Property Value
Type |
---|
System.Boolean |
Count
Gets the number of elements contained in the collection.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
DataSet
Gets the underlying DataSet.
Declaration
public DataSet DataSet { get; }
Property Value
Type |
---|
System.Data.DataSet |
Item[String]
Gets or sets the entry with the specified name.
Declaration
public SourceListSetEntry this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type |
---|
SourceListSetEntry |
Version
Gets the version number of this collection. The version is increased each time the collection or an element within the collection was modified.
Declaration
public int Version { get; }
Property Value
Type |
---|
System.Int32 |
Methods
Add(SourceListSetEntry)
Adds a SourceListSetEntry to the end of the collection.
Declaration
public int Add(SourceListSetEntry value)
Parameters
Type | Name | Description |
---|---|---|
SourceListSetEntry | value | The element to be added to the end of the collection. The value must not be a NULL reference (Nothing in Visual Basic). |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based collection index at which the value has been added. |
Add(IEnumerable)
Creates a SourceListSetEntry and adds it to the end of the collection.
Declaration
public int Add(IEnumerable list)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | list | The IList. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based collection index at which the value has been added. |
Add(IListSource)
Creates a SourceListSetEntry and adds it to the end of the collection.
Declaration
public int Add(IListSource list)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.IListSource | list | The IListSource. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based collection index at which the value has been added. |
Add(String, IEnumerable)
Creates a SourceListSetEntry and adds it to the end of the collection.
Declaration
public int Add(string name, IEnumerable list)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entry. |
System.Collections.IEnumerable | list | The IList. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based collection index at which the value has been added. |
Add(String, IListSource)
Creates a SourceListSetEntry and adds it to the end of the collection.
Declaration
public int Add(string name, IListSource list)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the entry. |
System.ComponentModel.IListSource | list | The IListSource. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based collection index at which the value has been added. |
Clear()
Removes all elements from the collection.
Declaration
public void Clear()
Contains(SourceListSetEntry)
Determines if the element belongs to this collection.
Declaration
public bool Contains(SourceListSetEntry value)
Parameters
Type | Name | Description |
---|---|---|
SourceListSetEntry | value | The Object to locate in the collection. The value can be a NULL reference (Nothing in Visual Basic). |
Returns
Type | Description |
---|---|
System.Boolean | True if item is found in the collection; otherwise, False. |
Contains(String)
Determines if the element with the specified name belongs to this collection.
Declaration
public bool Contains(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the element to locate in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if item is found in the collection; otherwise, False. |
CopyTo(SourceListSetEntry[], Int32)
Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(SourceListSetEntry[] array, int index)
Parameters
Type | Name | Description |
---|---|---|
SourceListSetEntry[] | array | The one-dimensional array that is the destination of the elements copied from the ArrayList. The array must have zero-based indexing. |
System.Int32 | index | The zero-based index in an array at which copying begins. |
Dispose()
Disposes of the object and entries.
Declaration
public void Dispose()
GetEnumerator()
Returns a strong-typed enumerator.
Declaration
public SourceListSetEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
SourceListSetEnumerator | A strong-typed enumerator. |
GetStandardValues(PropertyDescriptor)
Provides collection of choices for RelationDescriptor.ChildTableName.
Declaration
public ICollection GetStandardValues(PropertyDescriptor pd)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.PropertyDescriptor | pd | The property descriptor. |
Returns
Type | Description |
---|---|
System.Collections.ICollection | A list of choices for child table name. |
InitializeFromDataSet(DataSet)
Populates the entries from a DataSet.
Declaration
public void InitializeFromDataSet(DataSet ds)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataSet | ds | The DataSet. |
Remove(SourceListSetEntry)
Removes the specified element from the collection.
Declaration
public void Remove(SourceListSetEntry value)
Parameters
Type | Name | Description |
---|---|---|
SourceListSetEntry | value | The element to remove from the collection. If the value is NULL or the element is not contained in the collection, the method will do nothing. |
Explicit Interface Implementations
ICollection.CopyTo(Array, Int32)
Copies the elements of the System.Collections.ICollection to an System.Array, starting at a particular System.Array index.
Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ICollection. The System.Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
ICollection.IsSynchronized
Gets a value indicating whether access to the System.Collections.ICollection is synchronized.
Declaration
bool ICollection.IsSynchronized { get; }
Returns
Type |
---|
System.Boolean |
ICollection.SyncRoot
Gets an object that can be used to synchronize access to the System.Collections.ICollection.
Declaration
object ICollection.SyncRoot { get; }
Returns
Type |
---|
System.Object |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |