How to sort a DataGridView Column?

后端 未结 2 548
面向向阳花
面向向阳花 2021-01-16 05:29

I\'ve created a DataTable as follows:

        accTable = new DataTable();
        accTable.Columns.Add(new DataColumn(\"Date\"));
        accTable.Columns.Ad         


        
2条回答
  •  旧巷少年郎
    2021-01-16 06:17

    For date data, we can use the following code:

    dgv_transfer_from.Sort(dgv_transfer_from.Columns["Date_Out"], ListSortDirection.Ascending);
    

提交回复
热议问题