Hello i have a datagridview which has datasource of list and this list is:
public class UniqueNounWithFreq
{
public int freq { get; set; }
public string word { get; set; }
public UniqueNounWithFreq(string word, int freq)
{
this.freq = freq;
this.word = word;
}
}
if (e.KeyChar == (char)13)
{
foreach (DataGridViewRow item in dataGridView_w2wm2.Rows)
{
if (!item.Cells[2].Value.ToString().Contains(textBox1.ToString().ToLower()))
{
item.Visible = false;
}
else
{
item.Visible = true;
}
}
}
When I want to hide a row with key press it throws
Row associated with the currency manager's position cannot be made invisible exception
Which you can see here : Unable To set row visible false of a datagridview. I tried the method sugested there but it did not work for me. Also when I check the lengths of the strings I wrote even if they are same they does not match. if you can help me I appreciate that.