Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got an error with the below statements :
Can not fine column [name]

C#
DataView DV = new DataView(dbdataset);
MessageBox.Show(textBox1.Text);
DV.RowFilter = string.Format("name LIKE '%{0}%'", textBox1.Text);

this.dataGridView1.DataSource = DV;            
Posted
Updated 17-Nov-14 4:05am
v2
Comments
Richard Deeming 17-Nov-14 9:42am    
The error is quite clear - your DataView doesn't contain a column called "name".

1 solution

You build a filter where you compare name column to the content of textBox1.Text. Obviously there is no such column name!!!
Check you DataView at runtime and correct the problem...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900