# GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2" class="text-break">ObservableCollectionAdapter&lt;TSource, TTarget&gt; Class
</h1>
  <div class="markdown level0 summary"><p>Represents an adapter that converts a Viewer's <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection&lt;T&gt;</a> to a WPF <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection&lt;T&gt;</a> for data binding in XAML markup.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.collection-1">Collection</a>&lt;TTarget&gt;</div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection</a>&lt;TTarget&gt;</div>
    <div class="level3"><span class="xref">ObservableCollectionAdapter&lt;TSource, TTarget&gt;</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;TTarget&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;TTarget&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ilist">IList</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.icollection">ICollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;TTarget&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlycollection-1">IReadOnlyCollection</a>&lt;TTarget&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;TTarget&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.specialized.inotifycollectionchanged">INotifyCollectionChanged</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.ActiveReports.Converters.html">GrapeCity.ActiveReports.Converters</a></h6>
  <h6><strong>Assembly</strong>: MESCIUS.ActiveReports.Viewer.Wpf.dll</h6>
  <h5 id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ObservableCollectionAdapter&lt;TSource, TTarget&gt; : ObservableCollection&lt;TTarget&gt;, IList&lt;TTarget&gt;, ICollection&lt;TTarget&gt;, IList, ICollection, IReadOnlyList&lt;TTarget&gt;, IReadOnlyCollection&lt;TTarget&gt;, IEnumerable&lt;TTarget&gt;, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged where TSource : INotifyPropertyChanged</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">TSource</span></td>
        <td><p>The type of items in the source <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection&lt;T&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td><span class="parametername">TTarget</span></td>
        <td><p>The type of items in the target <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.observablecollection-1">ObservableCollection&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2__ctor_System_Collections_ObjectModel_ObservableCollection__0__System_Func__0_System_Int32__1__" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.#ctor(System.Collections.ObjectModel.ObservableCollection{`0},System.Func{`0,System.Int32,`1})">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.-ctor.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2__ctor_System_Collections_ObjectModel_ObservableCollection__0__System_Func__0_System_Int32__1__">ObservableCollectionAdapter(ObservableCollection&lt;TSource&gt;, Func&lt;TSource, int, TTarget&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.html">ObservableCollectionAdapter&lt;TSource, TTarget&gt;</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_ClearItems" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.ClearItems">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.ClearItems.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_ClearItems">ClearItems()</a>
        </td>
        <td class="markdown level1 summary"><p>Removes all items from the collection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_InsertItem_System_Int32__1_" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.InsertItem(System.Int32,`1)">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.InsertItem.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_InsertItem_System_Int32__1_">InsertItem(int, TTarget)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_MoveItem_System_Int32_System_Int32_" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.MoveItem(System.Int32,System.Int32)">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.MoveItem.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_MoveItem_System_Int32_System_Int32_">MoveItem(int, int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_RemoveItem_System_Int32_" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.RemoveItem(System.Int32)">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.RemoveItem.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_RemoveItem_System_Int32_">RemoveItem(int)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_SetItem_System_Int32__1_" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.SetItem(System.Int32,`1)">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.SetItem.html#GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_SetItem_System_Int32__1_">SetItem(int, TTarget)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_CollectionChanged" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.CollectionChanged">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.CollectionChanged.html">CollectionChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the collection changes.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_ActiveReports_Converters_ObservableCollectionAdapter_2_PropertyChanged" data-uid="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter`2.PropertyChanged">
          <a class="xref" href="GrapeCity.ActiveReports.Converters.ObservableCollectionAdapter-2.PropertyChanged.html">PropertyChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Exposes underlying collection PropertyChanged event.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
