Re: This type of Filtering possible? by Chris
Chris
Thu Sep 30 14:21:05 CDT 2004
Hi Beverly,
I was a bit knocked over in the beginning until I read the help on the
DataColumn.Expression (thanks to Miha and Marina) and it works, pretty
powerful. For an integer column called IntCol an example would be
TheView.RowFilter = "CONVERT(IntCol, 'System.String') Like '" & theText &
"%'"
"Beverley" <ali_webitems@hotmail.com> wrote in message
news:eyC#lEypEHA.132@TK2MSFTNGP14.phx.gbl...
> If it's an integer, could you not just do something like "between 120000
and 129999" or
> ">= 120000 and < 130000" to get all of the ones that begin with 12?
>
> Of course, this method won't work if you really want to see 12, 120-129,
1200-1299, etc
>
> Beverley
>
> > > "Chris Botha" <chris_s_botha@AT.h.o.t.m.a.i.l.com> wrote in message
> > > news:eVfAU8wpEHA.2900@TK2MSFTNGP12.phx.gbl...
> > > > The DataTable has a column containing integers.
> > > > Filtering it as "Where ColName=12" filters fine.
> > > > Here is the problem. I want to filter the integer column using
"Like".
> > For
> > > a
> > > > string column the following will work "Where StrColName Like '12%'".
I
> > > > need the same effect on the integer column.
> > > >
> > > > Thanks for any pointers.
> > > >
> > > >
> > >
> > >
> >
> >
>
>