Re: dataview sort problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The rows never physically get sorted. The view provides a sorted view of the
data. The table never changes. You have to access the data through the view
to see it sorted. Going to the table itself does nothing - no reason to
create the view in the first place.

This is why you can have multiple views on one table. Otherwise, which one
would win?

"Jim" <keithjd@xxxxxxxxx> wrote in message
news:1158695140.346936.70610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a dataview that I'm trying to apply a sort to, but when I
iterate through the rows in the dataview, they are still in the
original order. Here's my code. I'm using an XML document to populate
my DataSet

DataView dvProject = new DataView(MyDS.Tables["Project"], "FY = 2008",
"FY ASC", DataViewRowState.None);
// dvProject.Sort = "FY ASC, Quarter ASC";
Console.WriteLine("{0}", dvProject.Sort);

foreach (DataRow _Project in dvProject.Table.Rows)
{
Console.WriteLine("{0}{1}", _Project["FY"], _Project["Quarter"]);
}

Should be fairly straight-forward right?? I even tried to put on a
rowfilter with no luck. Anyone have any ideas? thx --jim



.



Relevant Pages

  • Re: Simple XmlDocument OuterXml UTF8 Question
    ... foreach (XmlNode child in xml.ChildNodes) { ... I want to send binary data ... > such as a Microsoft word doc embedded in my xml document. ...
    (microsoft.public.dotnet.xml)
  • DBD-DBM too slow
    ... I populate table that I created with 200000 integer and strings. ... use DBI; ... # mkUtil is nothing but collection of simple functions like random number generator ... foreach my $cid { ...
    (perl.dbi.users)
  • Building an XML document in-memory from an XSD file.
    ... I have a complex XSD schema that I would like to use as the basis for ... building an XML document that will be passed to a web service. ... I would like to populate the elements ... with values and pass it to the web service as an XmlNode ROOT object. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • XML storage of Form data
    ... I'm looking at storing data from an aspx form in an XML document, ... was looking into was how to reload the form, and populate the items from the ... A simple code snipet to show how to populate an xml element in to its ...
    (microsoft.public.dotnet.xml)
  • Extract XML using Dotnet
    ... I want to populate a nodelist so that i can extract various details. ... The xml document i have is similar to the one below. ...
    (microsoft.public.dotnet.xml)