SqlConnection con = new SqlConnection(Global.path); con.Open(); string sql = string.Format("select DepartmentCode,DepartmentName from MasterDepartment order by DepartmentCode asc"); SqlDataAdapter ad = new SqlDataAdapter(sql, con); DataTable ds = new DataTable(); ad.Fill(ds); grid1.DataContext = ds; con.Close();
grid1.DataSource = ds;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)