Datagridview Search?

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

Guest

Hello,

How do you search a datagridview for given column values?

Any help would be greatly appreciated!
Thanks in advance
 
Hello,

How do you search a datagridview for given column values?

Any help would be greatly appreciated!
Thanks in advance

1) If the control is bound to an underlying DataTable or DataSet, it would be better to search there
rather than search the control.

2) If unbound, you would have to iterate through all the rows looking for the specified column value
using somthing like this:

If Me.MainGridView.Rows(Index as Integer).Cells(ColumnName as String).Value = MyValue Then

End If

Gene
 
Gene,

AFAIK can a DataGridView not be used unbound althouhg it should be easier
than with the DataGrid to bind it to another object.

I would have written your first sentence if you had not done it already.

Cor
 
Gene,

AFAIK can a DataGridView not be used unbound althouhg it should be easier
than with the DataGrid to bind it to another object.
I'm not sure what you are trying to say in the above sentence. Are you asking how the DataGridView
is used with unbound data?


Gene
 
Gene,

In my idea that is impossible yes, therefore maybe you can show it with a
sample.

Cor
 
Gene,

In my idea that is impossible yes, therefore maybe you can show it with a
sample.

Cor
There is a trivial example in the Help file:
Walkthrough: Creating An Unbound Windows Forms DataGridView Control

Gene
 
Gene,

I did not know this, thanks,

Cor

gene kelley said:
There is a trivial example in the Help file:
Walkthrough: Creating An Unbound Windows Forms DataGridView Control

Gene
 
Back
Top