T
tshad
I do a select into a Dataset, apply a DataView to it and then sort it. But
the sort is not correct. I am sorting it by the UserName and it is not in
alpha order when I bind it to my datagrid.
When the filter and sort look like:
dv.RowFilter: ActionType = 1
dv.Sort = UserFullName asc,SessionID,CreateDate
HistoryLogGrid.DataSource = dv
HistoryLogGrid.DataBind()
I get the following rows:
Joe
Joseph
Robert
Jose
Debbie
Joe
Ana
Ana
Brian
Boz
Charlie
....
Notice how the first few rows are not sorted then they are.
If I reverse the sort so that I have the following for the filter and sort
and databind:
dv.RowFilter: ActionType = 1
dv.Sort = UserFullName desc,SessionID,CreateDate
HistoryLogGrid.DataSource = dv
HistoryLogGrid.DataBind()
I get the following:
....
Charlie
Boz
Brian
Ana
Ana
Joe
Joseph
Robert
Jose
Debbie
Joe
You can see the order has change except for the few that were not sorted in
the first example. And they are in the same order as the first example.
Why is this???
Am I missing something?
Thanks,
Tom
the sort is not correct. I am sorting it by the UserName and it is not in
alpha order when I bind it to my datagrid.
When the filter and sort look like:
dv.RowFilter: ActionType = 1
dv.Sort = UserFullName asc,SessionID,CreateDate
HistoryLogGrid.DataSource = dv
HistoryLogGrid.DataBind()
I get the following rows:
Joe
Joseph
Robert
Jose
Debbie
Joe
Ana
Ana
Brian
Boz
Charlie
....
Notice how the first few rows are not sorted then they are.
If I reverse the sort so that I have the following for the filter and sort
and databind:
dv.RowFilter: ActionType = 1
dv.Sort = UserFullName desc,SessionID,CreateDate
HistoryLogGrid.DataSource = dv
HistoryLogGrid.DataBind()
I get the following:
....
Charlie
Boz
Brian
Ana
Ana
Joe
Joseph
Robert
Jose
Debbie
Joe
You can see the order has change except for the few that were not sorted in
the first example. And they are in the same order as the first example.
Why is this???
Am I missing something?
Thanks,
Tom