为什么dataTable.DefaultView.Sort不起作用

2024-11-15 15:36:58
推荐回答(1个)
回答(1):

C# code dtServerBOList.DefaultView.Sort = "ServerName";
for (int i = 0; i < dtServerBOList.DefaultView.Count; i++)
{
DataRowVew drv = dtServerBOList.DefaultView.Item[i]
Console.WriteLine (drv["ServerName"].ToString());
}