Unexpected sorting while executing Table.Select()

  • Thread starter Thread starter Vitaly Sedov
  • Start date Start date
V

Vitaly Sedov

Hi All!

I have Table sorted by second ("name") field.
When I apply filter:
DataRow[] newCopy = request.Table.Select(request.Filter);
I got DataRow List sorted by first ("id") field.
But I need no reorder Rows

Can somebody help?

Thank you,
Vitaly Sedov
 
Hi,

DataTable is never sorted by DataView.
DataView just represents the rows in sorted order but does not actually sort
the rows.
You might use RowFilter on DataView rather then doing Select.
 
Thank you!
It helps!

Miha Markic said:
Hi,

DataTable is never sorted by DataView.
DataView just represents the rows in sorted order but does not actually sort
the rows.
You might use RowFilter on DataView rather then doing Select.
--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Vitaly Sedov said:
Hi All!

I have Table sorted by second ("name") field.
When I apply filter:
DataRow[] newCopy = request.Table.Select(request.Filter);
I got DataRow List sorted by first ("id") field.
But I need no reorder Rows

Can somebody help?

Thank you,
Vitaly Sedov

 
Back
Top