Find and select a item in datagridview using value (don have the i

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all.

I would like to automaticly select a item in a datagridview using the value
of column[0]. I do not have the index. Just the value (which is a string).

How can this be done?

Thanks.
 
If you are doing it with database I would suggest you only retrieve the rows
that you want isn't that easier?

chanmm
 
Yes i could do that, but i would also like to know how to find a row in a
datagridview with only the value (unik) of a column.

Thanks anyway

Lars E.

chanmm said:
If you are doing it with database I would suggest you only retrieve the rows
that you want isn't that easier?

chanmm

Lars E. Nes said:
Hi all.

I would like to automaticly select a item in a datagridview using the
value
of column[0]. I do not have the index. Just the value (which is a string).

How can this be done?

Thanks.
 
I was trying to do something similar and came across a solution that
worked for me.

Essentially I used the binding source to get the row;

myBindingSource.Position = myBindingSource.Find("Company_OPTID",
iCompanyID);

This seems to set the selected row to that position (my datagridview is
set to fullrowselect mode and multiselect is false)

Yes i could do that, but i would also like to know how to find a row in a
datagridview with only the value (unik) of a column.

Thanks anyway

Lars E.

chanmm said:
If you are doing it with database I would suggest you only retrieve the rows
that you want isn't that easier?

chanmm

Lars E. Nes said:
Hi all.

I would like to automaticly select a item in a datagridview using the
value
of column[0]. I do not have the index. Just the value (which is a string).

How can this be done?

Thanks.
 
Back
Top