VB.NET DefaultView/DataView

Full screen VB.NET Topic list That's not how you sort a DataView. Sorting is built in via the Sort property. You specify what is basically a SQL ORDER BY clause and the DataView exposes its data sorted in that order, e.g. The DefaultView property returns a DataView you can use to sort, filter, and search a DataTable. BEFORE:- damyactivity = New SqlDataAdapter("select no,wo,sno,stamp,person,activity,value from update_log" & _ " where no=" & Trim(TxtNo.Text) & " order by stamp desc", mysqlconnection) mysqlconnection.Close() damyactivity.Fill(dsmyactivity, "activity") AFTER:- damyactivity = New SqlDataAdapter("select no,wo,sno,stamp,person,activity,value from update_log" & _ " where no=" & Trim(TxtNo.Text), mysqlconnection) mysqlconnection.Close() damyactivity.Fill(dsmyactivity, "activity") dsmyactivity.Tables("activity").DefaultView.Sort = "stamp asc" Copyright © 2015-19 Allied Factors Limited. All Rights Reserved.