Hello,
How do you search a datagridview for given column values?
Any help would be greatly appreciated!
Thanks in advance 6 18901
On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.comwrote:
>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 kelley" <ok**@by.meschreef in bericht
news:46********************************@4ax.com...
On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.com>
wrote:
>>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
On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" <no************@planet.nlwrote:
>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
>I would have written your first sentence if you had not done it already.
Cor
"gene kelley" <ok**@by.meschreef in bericht news:46********************************@4ax.com.. .
>On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.com> wrote:
>>>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,
In my idea that is impossible yes, therefore maybe you can show it with a
sample.
Cor
"gene kelley" <ok**@by.meschreef in bericht
news:at********************************@4ax.com...
On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]"
<no************@planet.nlwrote:
>>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
>>I would have written your first sentence if you had not done it already.
Cor
"gene kelley" <ok**@by.meschreef in bericht news:46********************************@4ax.com. ..
>>On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.com> wrote:
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
On Thu, 24 Aug 2006 08:00:16 +0200, "Cor Ligthert [MVP]" <no************@planet.nlwrote:
>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 kelley" <ok**@by.meschreef in bericht news:at********************************@4ax.com.. .
>On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" <no************@planet.nlwrote:
>>>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
>>>I would have written your first sentence if you had not done it already.
Cor
"gene kelley" <ok**@by.meschreef in bericht news:46********************************@4ax.com ... On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.com> wrote:
>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,
I did not know this, thanks,
Cor
"gene kelley" <ok**@by.meschreef in bericht
news:mq********************************@4ax.com...
On Thu, 24 Aug 2006 08:00:16 +0200, "Cor Ligthert [MVP]"
<no************@planet.nlwrote:
>>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 kelley" <ok**@by.meschreef in bericht news:at********************************@4ax.com. ..
>>On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" <no************@planet.nlwrote:
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
I would have written your first sentence if you had not done it already.
Cor
"gene kelley" <ok**@by.meschreef in bericht news:46********************************@4ax.co m... On Tue, 22 Aug 2006 16:21:01 -0700, Mark <Ma**@discussions.microsoft.com> wrote: > >>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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Job Lot |
last post by:
How can I filter/search records in DataGridView after filling it with data?
The BindingNavigator provides default functionality for navigating, adding,
deleting and saving records. Is there...
|
by: The Other Mike |
last post by:
VS 2005
Is their a way to dynamically change the where clause in a datagridview or
dataset?
I have a search window where the user can enter a part number or description
or customer etc... and...
|
by: Prashwee |
last post by:
Hello All
In my windows application I am using DataGridView as my grid control. I
populated let's say 10 rows of data and modified 3 random rows. I need to
put some sort of Edit Marker in the...
|
by: Johnny E. Jensen |
last post by:
Hello
Dot sure if this it the right group but here goes.
I'am using the DataGridView multiple times in my application, and then i'll
read a book on inherience, and that opend a new world for...
|
by: Freddy Coal |
last post by:
Hi, I'm learning to use the Datagridview; I would like sort a column of my
DGV, but with code, not with user click over the column, how make that?; Mi
other question is how
search for a especific...
|
by: Richard Lewis Haggard |
last post by:
I have an unbound DataGridView control that has some cells that may contain
more multi-line text than can be completely displayed in the available
screen space. When the height of its row to...
|
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= |
last post by:
I want to be able to increase or decrease row heights of a populated
DataGridView from the keyboard. I set up a test program with menu items to
increase and decrease, assigned shortkey keys...
|
by: akshaycjoshi |
last post by:
I have one datagridview which i fill using the connected verion of ADO.NET.
When the user presses the search button a seperate thread is created and in that thead i connect to the database and fill...
|
by: BabliS1 |
last post by:
I am using Vb.net2005. I have a datagridview which displays some data. I want to filter the records based on some criteria given by the user at runtime. How can I do this. Please Help.
Thanks in...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |