Wraps IList objects.
Namespace: Dapfor.Net.DataAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
public sealed class ListDataAccessor : IDataAccessor, IEnumerable<IDataField>, IEnumerable |
Visual Basic |
---|
Public NotInheritable Class ListDataAccessor Implements IDataAccessor, IEnumerable(Of IDataField), IEnumerable |
Visual C++ |
---|
public ref class ListDataAccessor sealed : IDataAccessor, IEnumerable<IDataField^>, IEnumerable |
F# |
---|
[<SealedAttribute>] type ListDataAccessor = class interface IDataAccessor interface IEnumerable<IDataField> interface IEnumerable end |
Remarks
This class enables to insert IList objects via Grid.Rows.Add(IList) method.
Copy | |
---|---|
public void AddEnumerableCollection(Grid grid) { grid.Headers.Add(new Header()); grid.Headers[0].Add(new Column("Column 1")); grid.Headers[0].Add(new Column("Column 2")); grid.Headers[0].Add(new Column("Column 3")); string[] collection = new string[] { "cell 11", "cell 12", "cell 13" }; //The collection implements IList interface and is wrapped by the ListDataAccessor grid.Rows.Add(collection); //The collection implements IList interface and is wrapped explicitly by the ListDataAccessor grid.Rows.Add(new ListDataAccessor(collection)); //The next code adds the same collection to the grid, but wrapped by the EnumerableDataAccessor grid.Rows.Add(new EnumerableDataAccessor(collection)); } |