3
Answers

Help with Dataview Rowfilter

Ask a question
mark jones

mark jones

15y
7.5k
1

Can someone please help me with the followng problem. I currently have a sql express database which has records of movies (title, category etc).  Users can retrieve the data through a datagrid on windows form.  What I want is for a record to be retrieved through a matching string entered by the user. However, I am unsure of how to go about finding the string as the data is unpredetermined.  Below is part of the code I am using for the search.

private void button3_Click_1(object sender, System.EventArgs e)
  {   
 //Movset1 is dataset

  Dv = new DataView(Movset1.Tables[0]);
  dataGrid1.DataSource = Dv;
  //Below code doesnt work 
   Dv.RowFilter = "Title = textBox1.Text";

}


Answers (3)