DataView.Select Syntax
-
Hello Everyone For the DataView.Select Methode i use like this string as a DataColumn.Expression: string StatSelect = String.Format(ProductName LIKE '%{0}%'", SearchTextBox.Text); Productname is the Column where to search, but what is if i wanna search for the string in the whole table ( all columns) ? Thanks in Advance Jacko
-
Hello Everyone For the DataView.Select Methode i use like this string as a DataColumn.Expression: string StatSelect = String.Format(ProductName LIKE '%{0}%'", SearchTextBox.Text); Productname is the Column where to search, but what is if i wanna search for the string in the whole table ( all columns) ? Thanks in Advance Jacko
I would assume that you could simply append them to this using an OR condition.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
I would assume that you could simply append them to this using an OR condition.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
there is not another solution? since i dont know always wich datatables user is calling and this is a little bit strange query? string StatSelect = String.Format(ProductName LIKE '%{0}%'" OR ProductName LIKE '%{0}%'" OR etc....., SearchTextBox.Text); tought for something like: string StatSelect = String.Format('%' LIKE '%{0}%'", SearchTextBox.Text); ?
-
Hello Everyone For the DataView.Select Methode i use like this string as a DataColumn.Expression: string StatSelect = String.Format(ProductName LIKE '%{0}%'", SearchTextBox.Text); Productname is the Column where to search, but what is if i wanna search for the string in the whole table ( all columns) ? Thanks in Advance Jacko
sortexp = "Name LIKE '" + SearchFor + "%'";
dv.RowFilter = sortexp;