P
Peter S. Guild
Hello,
I have a simple routine that uses a dataview to hold information. I need to
sort these columns by section and then by desc. No matter what I do the
dataview will not sort.
What am I doing wrong?
Language is C#
..Net framework is 1.1
The MasterT is a dataview already.
All I get from the output is an un sorted list.
DataView dv = MasterT.Table.DefaultView;
dv.Sort = "section, desc";
for (int j=1; j < dv.Count; j++)
{
temp = dv.Table.Rows[j]["section"].ToString() + "^"
+ dv.Table.Rows[j]["desc"].ToString().Trim() + "^" ;
sw.WriteLine( temp );
} // loop through rows
I have a simple routine that uses a dataview to hold information. I need to
sort these columns by section and then by desc. No matter what I do the
dataview will not sort.
What am I doing wrong?
Language is C#
..Net framework is 1.1
The MasterT is a dataview already.
All I get from the output is an un sorted list.
DataView dv = MasterT.Table.DefaultView;
dv.Sort = "section, desc";
for (int j=1; j < dv.Count; j++)
{
temp = dv.Table.Rows[j]["section"].ToString() + "^"
+ dv.Table.Rows[j]["desc"].ToString().Trim() + "^" ;
sw.WriteLine( temp );
} // loop through rows