how to apply sorting in grid view field through codebehind. and my gridview code is: SqlDataAdapter da = new SqlDataAdapter("select * from newcustomer ", con); con.Open(); DataTable ds = new DataTable(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); con.close();