Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面是我的 DataTable 值。
Cards Signals card1 DO card1 DO card2 DO card2 DO card2 DO card3 DO
我想要我的 DataTable,它的值"card2"在顶部。我们怎样才能做到这一点?
"card2"
假设dtMy是你当前的表,你会得到你的排序结果dt
dtMy
dt
DataTable dt = new DataTable(); dt = new DataView(dtMy, "Cards= 'card2'", "", DataViewRowState.CurrentRows).ToTable(); dt.Merge(new DataView(dtMy, "Cards<> 'card2'", "", DataViewRowState.CurrentRows).ToTable());