title: C# Filter by number
body: <p>I've been trying this for 2 days now and i cant get it to work. I have a datagridview and i wanted to add two filters throught textboxes to it. One for names, and one for numeric code. The one using names works just fine, but i cant get the one for numbers to work, i've tried several pieces of code i found on the internet and none of them worked, you just write a number on the textbox but it wont do the filter on the datagridview!!</p>
  
  <p>Any suggestions? I believe i already tried everything i know and i found on the internet to no avail!</p>
  
  <p>EDIT: This is the piece of code i used for the name filter and tried reusing for the codes:</p>
  
  <pre><code>((DataTable)dataGridView1.DataSource).DefaultView.RowFilter = "descripcion like'" + busquedanom.Text.Trim().Replace("'", "''") + "%'";
  </code></pre>