friends,
i have sorted my datagrid using a dataview.i have used the code given below.any other easy method to sort the datagrid??
************************************************** ********
SqlConnection con3=new SqlConnection();
SqlDataAdapter ad = new SqlDataAdapter("select * from Admin_ringtone",con3);
DataSet ds = new DataSet();
DataView dv = new DataView();
ad.Fill(ds,"Admin_ringtone");
dv = new DataView(ds.Tables["Admin_ringtone"]);
dv.Sort = "code";
dv.Sort = "code DESC";
dv.Sort = "code";
DataGrid1.DataSource = dv;
DataGrid1.DataBind();
************************************************** ***********
|