# C1.WPF.FlexGrid.ColumnValueConverter.SetSource

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource*">SetSource Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource*"></a>
<h4 id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_System_Collections_IDictionary_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource(System.Collections.IDictionary)">SetSource(IDictionary)</h4>
<div class="markdown level1 summary"><p>Sets the converter source to a dictionary containing keys (objects to store in the column
cells) and their corresponding display values (strings to display to the user).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSource(IDictionary dictionary)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSource(dictionary As IDictionary)</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.collections.idictionary">IDictionary</a></td>
      <td><span class="parametername">dictionary</span></td>
      <td><p>Dictionary containing keys (objects to store in the column cells)
and strings to display in the cells.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource*"></a>
<h4 id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_System_Collections_ICollection_System_Boolean_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource(System.Collections.ICollection,System.Boolean)">SetSource(ICollection, bool)</h4>
<div class="markdown level1 summary"><p>Sets the converter source to a list of values to store in the cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSource(ICollection values, bool exclusive)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSource(values As ICollection, exclusive As Boolean)</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.collections.icollection">ICollection</a></td>
      <td><span class="parametername">values</span></td>
      <td><p>Values to store in cells and display to user.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">exclusive</span></td>
      <td><p>Whether the user can enter values that are not on the list.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource*"></a>
<h4 id="C1_WPF_FlexGrid_ColumnValueConverter_SetSource_System_Collections_IEnumerable_System_String_System_String_" data-uid="C1.WPF.FlexGrid.ColumnValueConverter.SetSource(System.Collections.IEnumerable,System.String,System.String)">SetSource(IEnumerable, string, string)</h4>
<div class="markdown level1 summary"><p>Sets the converter source to a list of objects that contain the keys (values stored
in the column cells) and their corresponding display values.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetSource(IEnumerable values, string valuePath, string displayMemberPath)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetSource(values As IEnumerable, valuePath As String, displayMemberPath As String)</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.collections.ienumerable">IEnumerable</a></td>
      <td><span class="parametername">values</span></td>
      <td><p>Collection of objects that contain the key and display values for the column.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">valuePath</span></td>
      <td><p>Name of the property that contains the values stored in the grid.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">displayMemberPath</span></td>
      <td><p>Name of the property that contains the values displayed in the grid.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
