Hi i am making a combobox multi search. I have a table and coloums like studentid,Fullname,lastname which i have populated into the combobox. Beside the combobox i have textbox. The function i am trying to create is the user selects the colums he wants and enter the search text in the seach txtbox and this the code
string userInput = searchOptionCBX.SelectedItem.ToString().Trim();
string search_query = "select firstname,lastname,phone from Student_Admission_Table where '" + userInput + "' = '" + searchTbx.Text + "' ";
student_data_adapter.SelectCommand = new SqlCommand(search_query,connection.SqlConnect());
student_data_adapter.Fill(studentdataset);
ResultGRIDview.DataSource = studentdataset.Tables[0];
but i get a empty girdview