You shouldn't use the DefaultView property instead you should create a new DataView. The reason for creating a new is;
it doesn't work when setting the property to "DefaultView" is because you have to access the DefaultView, not the DataSet to get the sorted results. Manipulating the DefaultView is usually not a good idea.
Basically, create a new instance of the DataView class and pass that around after you set the sort, and work with that.
sqlConnection.Open();
SqlDataAdapter sqlAdapter = new SqlDataAdapter(sqlCommand);
DataSet ds = new DataSet();
sqlAdapter.Fill(ds);
DataView dv = new DataView(ds.Tables[0]);
dv.RowFilter = "Name = 'Brown'";
sqlConnection.Close();
return dv;
for a reference see this link;
Sort datatable[
^]