Last post Feb 20, 2013 06:04 PM by fuelpagan
Jul 07, 2006 10:41 AM|heck0045|LINK
Hi, can anyone tell me why the following .sort command (in bold) does not actually do anything? I'm stumped. I can take out the command and the table is sorted the same way as when I leave the command in. From what I've read, this should work, but maybe
I'm missing something?
DataTable dt = holdTable.Tables.Add();
int> kvp in allPaths)
DataRow row = dt.NewRow();
row["Path"] = kvp.Key;
row["Visitors"] = kvp.Value;
//essentially a distinct on each session_id
..the rView.Table.Rows is NOT sorted?
Jul 07, 2006 02:17 PM|Caddre|LINK
Feb 20, 2013 06:04 PM|fuelpagan|LINK
You're long past this problem, but for those who find this looking for help like myself...
I ran into this issue and discovered the problem is in the loop reading the data.
foreach (DataRow nRow in rView.Table.Rows)
It should read:
foreach (DataRowView nRow in rView)
This will now loop through the sorted data like you expected the program to.