title: DataGridView Column Header Cell Drop-Down Filter List, make case insensitive
body: <p>As per <a href="https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/aa480727(v=msdn.10)?redirectedfrom=MSDN" rel="nofollow noreferrer">this item</a> I have added code to a datagridview to automatically add column filtering list to certain column headers.</p>
  <pre><code> Private Sub DataGridView1_BindingContextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGridView1.BindingContextChanged
      For Each col As DataGridViewColumn In DataGridView1.Columns
          If col.Name = &quot;rating&quot; Or col.Name = &quot;check&quot; Or col.Name = &quot;artist&quot; Or col.Name = &quot;genre&quot; Or col.Name = &quot;album&quot; Or col.Name = &quot;year&quot; Or col.Name = &quot;bpm&quot; Or col.Name = &quot;cover&quot; Then
              col.HeaderCell = New DataGridViewAutoFilterColumnHeaderCell(col.HeaderCell)
          End If
      Next
  End Sub
  
  Private Sub DataGridView1_DataBindingComplete(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewBindingCompleteEventArgs) Handles DataGridView1.DataBindingComplete
      FilterText = DataGridViewAutoFilterColumnHeaderCell.GetFilterStatus(DataGridView1)
      If String.IsNullOrEmpty(FilterText) Then FilterText = &quot;&quot;
  End Sub
  </code></pre>
  <p>However if my database bound column data contains the same string but with different cases the filter list contains multiple entries. For example my data for the datagridview artist column might contain &quot;Abba&quot; and &quot;ABBA&quot; and the datagridview auto generated column header list contains both case versions.
  How can I make the list case insensitive without modifying the underlying database data case so I only see &quot;Abba&quot; once in the list. (note I do not create the list as it is generated automatically from the bound datagridview database source data, see the link above)</p>
  <p><a href="https://i.stack.imgur.com/4PKXx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4PKXx.png" alt="enter image description here" /></a></p>