# C1.Win.DataCollection.ListViewEx.SetItemsSource

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_DataCollection_ListViewEx_SetItemsSource_" data-uid="C1.Win.DataCollection.ListViewEx.SetItemsSource*">SetItemsSource Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_DataCollection_ListViewEx_SetItemsSource_" data-uid="C1.Win.DataCollection.ListViewEx.SetItemsSource*"></a>
<h4 id="C1_Win_DataCollection_ListViewEx_SetItemsSource_System_Windows_Forms_ListView_System_Collections_IEnumerable_System_String_System_String_" data-uid="C1.Win.DataCollection.ListViewEx.SetItemsSource(System.Windows.Forms.ListView,System.Collections.IEnumerable,System.String,System.String)">SetItemsSource(ListView, IEnumerable, string, string?)</h4>
<div class="markdown level1 summary"><p>Populates items and groups of <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.listview">ListView</a> according to the source, supporting grouping, sorting and filtering.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static IDataCollection&lt;object?&gt; SetItemsSource(this ListView list, IEnumerable source, string textMemberPath = &quot;&quot;, string? largeIconMemberPath = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function SetItemsSource(list As ListView, source As IEnumerable, Optional textMemberPath As String = &quot;&quot;, Optional largeIconMemberPath As String = Nothing) As IDataCollection(Of Object)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.listview">ListView</a></td>
      <td><span class="parametername">list</span></td>
      <td><p>The list that will be populated.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The data source.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">textMemberPath</span></td>
      <td><p>The name of the property where the text of the item comes from.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">largeIconMemberPath</span></td>
      <td><p>The name of the property containing the urls of the images that will be downloaded to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.listview.largeimagelist">LargeImageList</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">IDataCollection</span>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
