In my program (asp.net, C#) I am using a gridview to show data. it gets the data from the following query.
select * from Nametable where NameID in (4,3,1,22,15,8,9,5,7)
But the problem is Gridview is showing the data
in ascending sort order of NameID like (1,3,4,5,7,8,9,15,22)
.
I dont want data to be sorted, it should show
exactly the way I mentioned in the query like (4,3,1,22,15,8,9,5,7)
Here is my code
private void loadGridView()
{
Query = "select * from Nametable where NameID in (4,3,1,22,15,8,9,5,7)"
DataSet ds = SqlHelper.ExecuteDataset(CommonSettings.Constring, CommandType.Text, Query);
GridView1.DataSource = ds;
GridView1.DataBind();
}