Wraps IList objects.

Namespace: Dapfor.Wpf.Data
Assembly: Dapfor.Wpf (in Dapfor.Wpf.dll) Version: 4.1.0.26317 (4.1.0.26317)

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 GridControl.Rows.Add(IList) method.
 Copy imageCopy
public void AddEnumerableCollection(GridControl 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));

}

Inheritance Hierarchy

System..::..Object
  Dapfor.Wpf.Data..::..ListDataAccessor

See Also