Filter Combobox Items Based on Values in a 2nd Column
<p>I have a Datatable(invTable) with 19 columns in it that I created from a csv file. From that Datatable I'm using the values in column2(name) to populate a Combobox. </p>

<p>What I need to do is filter the items from column2(name) that show up in the Combobox only if the value in column9(type) matches a preset value. i.e. only if the value in column9(type) is 15.</p>

<p>I also need to be able to work with the values in the rest of the columns based on the selected item in the Combobox. Assigning them to variables such as SelectedCol1-SelectedCol19 so that they can be used in other calculations throughout the program.</p>

<p>EDIT:
I was able to find something that suited my needs with the following code.</p>

<pre><code>var query = invTable.AsEnumerable().Where(c =&gt; c.Field&lt;String&gt;("Type").Equals("15"));
combo1.DataSource = query.AsDataView();
combo1.DisplayMember = "name";
combo1.ValueMember = "Index";
</code></pre>
