Hello Group,
I have a DataSet with one DataTable filled.
Before transforming the DataSet into a CSV-Format I have to Filter,
Sort and restrict the Number of Records.
Any suggestion how to archive this Step?

Please remember that it is not possible for me to Filter, Sort and
Restrict when filling the DataSet. It must be done with the existing
DataSet...
Code for Filling the DataSet and Transforming it is already done.

Thanks4Help

Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by aculfa

aculfa
Wed Jan 07 08:02:57 CST 2004


Have you tried to use DataView? With that you can sort and filter your
datatable.

Also for "group by" option there is a "DataSetHelper" project on msdn site.

Hope these are useful,





"NetDev" <netdev@interims.de> wrote in message
news:eedd7f4.0401070458.1d832083@posting.google.com...
> Hello Group,
> I have a DataSet with one DataTable filled.
> Before transforming the DataSet into a CSV-Format I have to Filter,
> Sort and restrict the Number of Records.
> Any suggestion how to archive this Step?
>
> Please remember that it is not possible for me to Filter, Sort and
> Restrict when filling the DataSet. It must be done with the existing
> DataSet...
> Code for Filling the DataSet and Transforming it is already done.
>
> Thanks4Help



Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by aculfa

aculfa
Wed Jan 07 07:59:53 CST 2004

Have you tried to use DataView? With that you can sort your dataTable.

And also for "group by" option there is a "DataSetHelper" class in msdn
site...

Hope these are useful,



"NetDev" <netdev@interims.de> wrote in message
news:eedd7f4.0401070458.1d832083@posting.google.com...
> Hello Group,
> I have a DataSet with one DataTable filled.
> Before transforming the DataSet into a CSV-Format I have to Filter,
> Sort and restrict the Number of Records.
> Any suggestion how to archive this Step?
>
> Please remember that it is not possible for me to Filter, Sort and
> Restrict when filling the DataSet. It must be done with the existing
> DataSet...
> Code for Filling the DataSet and Transforming it is already done.
>
> Thanks4Help



Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by Miha

Miha
Wed Jan 07 08:10:52 CST 2004

Hi,

There is DataView which does exactly that (over a DataTable).
It does not restrict rows number though.
As a workaround, you might add DataColumn to table, fill with with row
numbers, and set filter on it also.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"NetDev" <netdev@interims.de> wrote in message
news:eedd7f4.0401070458.1d832083@posting.google.com...
> Hello Group,
> I have a DataSet with one DataTable filled.
> Before transforming the DataSet into a CSV-Format I have to Filter,
> Sort and restrict the Number of Records.
> Any suggestion how to archive this Step?
>
> Please remember that it is not possible for me to Filter, Sort and
> Restrict when filling the DataSet. It must be done with the existing
> DataSet...
> Code for Filling the DataSet and Transforming it is already done.
>
> Thanks4Help



Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by William

William
Wed Jan 07 08:17:32 CST 2004

DataViews can do most of what you want as aculfa said. Here is a brief
example using Sort http://www.knowdotnet.com/articles/dataviewsort.html
and here's one on selecting Data
http://www.knowdotnet.com/articles/dataviewspart2.html

I would encourage to check the stuff out on MSDN though, it'll be very
helpful b/c you can use a DataTable's Select in addition to sort, rowfilter
etc on the Dataview.

HTH,

BIll
"NetDev" <netdev@interims.de> wrote in message
news:eedd7f4.0401070458.1d832083@posting.google.com...
> Hello Group,
> I have a DataSet with one DataTable filled.
> Before transforming the DataSet into a CSV-Format I have to Filter,
> Sort and restrict the Number of Records.
> Any suggestion how to archive this Step?
>
> Please remember that it is not possible for me to Filter, Sort and
> Restrict when filling the DataSet. It must be done with the existing
> DataSet...
> Code for Filling the DataSet and Transforming it is already done.
>
> Thanks4Help



Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by netdev

netdev
Wed Jan 07 12:51:26 CST 2004

Thanks for your answers.

The problem is, that I have to "dump" the complete DataSet at the end
by doing a Transform with a XMLDataDocument. So I think it does not
help me to use a DataView which is useful for presenating the Data
(eg. for a DataGrid). But maybe I am wrong?!

Regards


"William Ryan" <dotnetguru@comcast.nospam.net> wrote in message news:<uNPqBiS1DHA.2456@TK2MSFTNGP12.phx.gbl>...
> DataViews can do most of what you want as aculfa said. Here is a brief
> example using Sort http://www.knowdotnet.com/articles/dataviewsort.html
> and here's one on selecting Data
> http://www.knowdotnet.com/articles/dataviewspart2.html
>
> I would encourage to check the stuff out on MSDN though, it'll be very
> helpful b/c you can use a DataTable's Select in addition to sort, rowfilter
> etc on the Dataview.
>
> HTH,
>
> BIll
> "NetDev" <netdev@interims.de> wrote in message
> news:eedd7f4.0401070458.1d832083@posting.google.com...
> > Hello Group,
> > I have a DataSet with one DataTable filled.
> > Before transforming the DataSet into a CSV-Format I have to Filter,
> > Sort and restrict the Number of Records.
> > Any suggestion how to archive this Step?
> >
> > Please remember that it is not possible for me to Filter, Sort and
> > Restrict when filling the DataSet. It must be done with the existing
> > DataSet...
> > Code for Filling the DataSet and Transforming it is already done.
> >
> > Thanks4Help

Re: Sort, Filter and Restrict RecordCount in a DataSet before Transformation by Miha

Miha
Thu Jan 08 04:07:30 CST 2004

Hi,

Ah. Then you have to copy dataset and remove all unnecessary rows from it.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"NetDev" <netdev@interims.de> wrote in message
news:eedd7f4.0401071051.2de9af03@posting.google.com...
> Thanks for your answers.
>
> The problem is, that I have to "dump" the complete DataSet at the end
> by doing a Transform with a XMLDataDocument. So I think it does not
> help me to use a DataView which is useful for presenating the Data
> (eg. for a DataGrid). But maybe I am wrong?!
>
> Regards
>
>
> "William Ryan" <dotnetguru@comcast.nospam.net> wrote in message
news:<uNPqBiS1DHA.2456@TK2MSFTNGP12.phx.gbl>...
> > DataViews can do most of what you want as aculfa said. Here is a brief
> > example using Sort http://www.knowdotnet.com/articles/dataviewsort.html
> > and here's one on selecting Data
> > http://www.knowdotnet.com/articles/dataviewspart2.html
> >
> > I would encourage to check the stuff out on MSDN though, it'll be very
> > helpful b/c you can use a DataTable's Select in addition to sort,
rowfilter
> > etc on the Dataview.
> >
> > HTH,
> >
> > BIll
> > "NetDev" <netdev@interims.de> wrote in message
> > news:eedd7f4.0401070458.1d832083@posting.google.com...
> > > Hello Group,
> > > I have a DataSet with one DataTable filled.
> > > Before transforming the DataSet into a CSV-Format I have to Filter,
> > > Sort and restrict the Number of Records.
> > > Any suggestion how to archive this Step?
> > >
> > > Please remember that it is not possible for me to Filter, Sort and
> > > Restrict when filling the DataSet. It must be done with the existing
> > > DataSet...
> > > Code for Filling the DataSet and Transforming it is already done.
> > >
> > > Thanks4Help