如何在VB.NET中使用DataGridView对数据进行排序?

use*_*269 2 vb.net ms-access

我不知道如何在 VB.NET 中使用 datagridview 对数据进行排序。如何通过使用文本框输入查询来做到这一点,我目前正在使用 OLEDB。这是我正在尝试做的事情的图片。

在此输入图像描述

小智 5

'declare this first:
imports system.componentmodel


'then put this code into a button or something
DGV.Sort(DGV.Columns(0), ListSortDirection.Ascending)

'DGv = datagridview
Run Code Online (Sandbox Code Playgroud)

祝你好运