sigo recibiendo este error cuando intento llamar Encuentra()Error: ¿El método especificado no es compatible?
public void findTxt(string text)
{
BindingSource src = new BindingSource();
src.DataSource = dataGridView1.DataSource;
src.Position = src.Find("p_Name", text); // Specified method is not supported
if (src.Position == 0 && dataGridView1.Rows[0].Cells[2].Value.ToString() == text)
{
MessageBox.Show("Item found!!");
dataGridView1.CurrentCell = dataGridView1.Rows[src.Position].Cells[2];
}
else if (src.Position == 0 && dataGridView1.Rows[0].Cells[2].Value.ToString() != text)
{
MessageBox.Show("Item not found!!");
}
else
{
MessageBox.Show("Item found!!");
dataGridView1.CurrentCell = dataGridView1.Rows[src.Position].Cells[2];
}
}
Editar:
me sale ese error al llamar método FINDTEXT de otra forma, por llamar a este método desde el formulario principal doesn' dar lugar a tal error.
¿Cuál es su resultado esperado? – Anonymous
Lo siento pero no entendí tu pregunta. Por favor, consulte mi edición. – DanSogaard