private DataTable TableSort(DataTable dt, string sort)
{
     DataRow[] resultRows = dt.Select( null , sort);
     DataTable tableTemp = dt.Copy();
     tableTemp.Rows.Clear();
     foreach (DataRow dr in resultRows)
     {
         object [] objItem = dr.ItemArray;
         DataRow row = tableTemp.NewRow();
         row.ItemArray = objItem;
         tableTemp.Rows.Add(row);
     }
     return tableTemp;
}

转载优特建站:http://www.youtiy.com/Articles/Item.aspx?Id=192