473,385 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
3 23712
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Madestro | last post by:
Hi guys, I am making a small program to retrieve e-mails from POP accounts. I got all the e-mail parsing stuff figured out, but I cannot seem to come up with a way to find out which e-mails are...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
4
by: Aaron Smith | last post by:
Dim dv As DataView = New DataView(FacilitiesDS1.Facilities, "", "ID ASC", DataViewRowState.CurrentRows) Dim iPos As Integer = dv.Find(dr.Item("ID")) Me.BindingContext(FacilitiesDS1,...
22
by: MP | last post by:
vb6,ado,mdb,win2k i pass the sql string to the .Execute method on the open connection to Table_Name(const) db table fwiw (the connection opened via class wrapper:) msConnString = "Data Source="...
5
by: Rainer Queck | last post by:
Hello NG, what would be the best way to locate a DataRrow in a DataGridView? I have by DataTable.Select a bunch of DataRows from a DataTable (which is the data source to the DataGridView). Now...
1
by: =?Utf-8?B?QnJpYW5ESA==?= | last post by:
Hi I am looking for examples of how to find the row index in a Datagridview control by comparing a string value to the value in a Cell. Thanks Brian
1
by: Coderer | last post by:
I have a project that I've been working on for a while, where several forms use DataGridViews to represent database information. The forms are .NET 2.0, in Studio 2005. For the past couple of...
4
by: =?Utf-8?B?UGFycm90?= | last post by:
I cannot programmatically select a row in datagridview control. I use the following instruction to change the selection of a row dataGridView2.ClearSelection(); dataGridView2.Rows.Selected =...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.