Bonjour,

JE joue avec un datatable afin de pourvoir attribuer de nouvelles valeurs.
Mais ca marche une fois sur 2 ?!?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
 int tempOrderStart = Convert.ToInt32(performanceDataSet.Tables[0].Rows[e.StartIndex]["Order"]);
                int tempOrderEnd = Convert.ToInt32(performanceDataSet.Tables[0].Rows[e.EndIndex]["Order"]);
 
                performanceDataSet.Tables[0].Rows[e.StartIndex]["Order"] = tempOrderEnd;
                performanceDataSet.Tables[0].Rows[e.EndIndex]["Order"] = tempOrderStart;
                performanceDataSet.AcceptChanges();
 
                DataView dataView = performanceDataSet.Tables[0].DefaultView;
                dataView.Sort = "Order Asc";
c'est comme si AcceptChanges() ne marchait pas tout le temps !!!

Qu un aurait il une solution ?