datatable中交换两行的数据:
datarow dr = table.newrow();
dr.ItemArray =dt.rows[i].ItemArray ;
dt.rows[i].ItemArray = dt.rows[i+1].ItemArray ;
dt.rows[i+1].ItemArray = dr.ItemArray ;
datatable中交换两行的数据:
datarow dr = table.newrow();
dr.ItemArray =dt.rows[i].ItemArray ;
dt.rows[i].ItemArray = dt.rows[i+1].ItemArray ;
dt.rows[i+1].ItemArray = dr.ItemArray ;
转载于:https://www.cnblogs.com/kafony/archive/2010/07/04/1770866.html