程序運行良好,但升序和降序按鈕不起任何作用。包含來自表的所有數據的DataGridView看起來都是相同的,並且沒有排序。它假設按標題排序。也許它排序,但不刷新DataGridView?DataView不會在DataGridView中升序或降序排序
private void btnSortAscendingRecords_Click(object sender, EventArgs e)
{
DataView TitlesDataView = new DataView(booksDataset1.Books);
TitlesDataView.Sort = "BookTitle ASC";
//sort asc titles in videosgrid
}
private void btnSortDescendingRecords_Click(object sender, EventArgs e)
{
DataView TitlesDataView = new DataView(booksDataset1.Books);
TitlesDataView.Sort = "BookTitle DESC";
//sort descending titles in videosgrid
}
我在找什麼。 – HelloWorld 2011-03-30 16:43:07
@HelloWorld酷,很高興它幫助 – 2011-03-31 05:39:07