private void txtSearch_TextChanged(object sender, EventArgs e) { try { DataView DV = new DataView(dbdataset); DV.RowFilter = string.Format("Convert[Product ID, System.String] LIKE '%{0}%' OR [Product Name] LIKE '%{0}%' OR [Brand Name] LIKE '%{0}%' OR [Pro. Size ID] LIKE '%{0}%'", txtSearch.Text); dgView.DataSource = DV; } catch (Exception ex) { Error_txt.Text = ex.Message; } }
Syntax error: Missing operand after '[Product ID, System.String]' operator.
Convert[Product ID, System.String] LIKE '%{0}%'
Convert([Product ID], 'System.String') LIKE '%{0}%'
DV.RowFilter = string.Format("[Product ID]'{0}' OR [Product Name]='{0}' OR [Brand Name]='{0}' OR [Pro. Size ID]='{0}'", txtSearch.Text);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)