By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,408 Members | 1,796 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,408 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Jun 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <Lars E. Ne*@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
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.

Jun 12 '06 #2

P: n/a
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" wrote:
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" <Lars E. Ne*@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
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.


Jun 12 '06 #3

P: n/a
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)
Lars E. Nes wrote:
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" wrote:
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" <Lars E. Ne*@discussions.microsoft.com> wrote in message
news:85**********************************@microsof t.com...
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.



Jun 24 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.