Re: typed dataset and sort order on save by W
W
Wed Jan 05 08:44:38 CST 2005
Donal:
You can traverse the XML document very easily using the XML namespace and
with XSLT - which you'd only have to write once - you can sort away any way
you'd like. Moreoever, like Miha mentions - a sort order on the save
probably isn't necessary - you can do the sorting whenever you deserialize
the dataset using the code that Cor showed you.
--
W.G. Ryan, MVP
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Donal McWeeney" <macker@newsgroup.nospam> wrote in message
news:uaO7gyy8EHA.3708@TK2MSFTNGP14.phx.gbl...
> Thanks for the replies ... I was hoping to avoid the manual
intravention...
>
>
> "Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
> news:OOBfVTy8EHA.2900@TK2MSFTNGP09.phx.gbl...
> > Donal,
> >
> > A dataset directly holds no records.
> > However datatables holds rows, do you mean one or more datatables?
> >
> > A simple way for that is this is
> >
> > \\\
> > DataView dv = new DataView(dt);
> > dv.Sort = "bla"; // sorts column bla
> > DataTable dtnew = dt.Clone();
> > foreach (DataRowView dvr in dv)
> > dtnew.ImportRow(dvr.Row);
> > dt.Clear();
> > dt = dtnew.Copy();
> > ///
> >
> > I hope this helps?
> >
> > Cor
> >
> >
> >
> >
> >
>
>