J
Jim
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
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