|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagridview Search?Hello,
How do you search a datagridview for given column values? Any help would be greatly appreciated! Thanks in advance On Tue, 22 Aug 2006 16:21:01 -0700, Mark <M***@discussions.microsoft.com> wrote:
>Hello, 1) If the control is bound to an underlying DataTable or DataSet, it would be better to search there> >How do you search a datagridview for given column values? > >Any help would be greatly appreciated! >Thanks in advance 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 Show quoteHide quote "gene kelley" <o***@by.me> schreef in bericht news:467ne2l2b7202je98i7hbr2bi6m7rrvje4@4ax.com... > On Tue, 22 Aug 2006 16:21:01 -0700, Mark <M***@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]" <notmyfirstn***@planet.nl> wrote: I'm not sure what you are trying to say in the above sentence. Are you asking how the DataGridView>Gene, > >AFAIK can a DataGridView not be used unbound althouhg it should be easier >than with the DataGrid to bind it to another object. > is used with unbound data? Gene Show quoteHide quote >I would have written your first sentence if you had not done it already. > >Cor > >"gene kelley" <o***@by.me> schreef in bericht >news:467ne2l2b7202je98i7hbr2bi6m7rrvje4@4ax.com... >> On Tue, 22 Aug 2006 16:21:01 -0700, Mark <M***@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 Show quoteHide quote "gene kelley" <o***@by.me> schreef in bericht news:at7qe2hfns560oq8jh91guf9uhfsm0g9fc@4ax.com... > On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" > <notmyfirstn***@planet.nl> wrote: > >>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" <o***@by.me> schreef in bericht >>news:467ne2l2b7202je98i7hbr2bi6m7rrvje4@4ax.com... >>> On Tue, 22 Aug 2006 16:21:01 -0700, Mark >>> <M***@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]" <notmyfirstn***@planet.nl> wrote: There is a trivial example in the Help file:>Gene, > >In my idea that is impossible yes, therefore maybe you can show it with a >sample. > >Cor > Walkthrough: Creating An Unbound Windows Forms DataGridView Control Gene Show quoteHide quote >"gene kelley" <o***@by.me> schreef in bericht >news:at7qe2hfns560oq8jh91guf9uhfsm0g9fc@4ax.com... >> On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" >> <notmyfirstn***@planet.nl> wrote: >> >>>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" <o***@by.me> schreef in bericht >>>news:467ne2l2b7202je98i7hbr2bi6m7rrvje4@4ax.com... >>>> On Tue, 22 Aug 2006 16:21:01 -0700, Mark >>>> <M***@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 Show quoteHide quote "gene kelley" <o***@by.me> schreef in bericht news:mqlqe2h70gl5hbbboascge7obp3g067015@4ax.com... > On Thu, 24 Aug 2006 08:00:16 +0200, "Cor Ligthert [MVP]" > <notmyfirstn***@planet.nl> wrote: > >>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" <o***@by.me> schreef in bericht >>news:at7qe2hfns560oq8jh91guf9uhfsm0g9fc@4ax.com... >>> On Wed, 23 Aug 2006 07:28:52 +0200, "Cor Ligthert [MVP]" >>> <notmyfirstn***@planet.nl> wrote: >>> >>>>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" <o***@by.me> schreef in bericht >>>>news:467ne2l2b7202je98i7hbr2bi6m7rrvje4@4ax.com... >>>>> On Tue, 22 Aug 2006 16:21:01 -0700, Mark >>>>> <M***@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 >>>> >>
VB Express SQL Express Remote Connection
Trouble with "Process's" please help! .NET equivilant of isnumeric Merging Datasets Incorrect behavior of IIf in VB.NET (.NET Framework 1.1 SP1) Text missing from RadioButtons in Groupbox can I use Imports with a VB2005 class namespace? Remove x number of charaters from string. Vb.net Trouble Instanciating Structures change gridview text |
|||||||||||||||||||||||