private GlobalFunction GFun = new GlobalFunction(); private OleDbDataReader oledr; private string sql; private void Btn_View_Course_Click(object sender, EventArgs e) { try { GFun.BindAccessConn(); sql = "select * from Tb_SCh_TIme_Table where Course = '" + cb_Course_Name.Text.ToString().Trim() + "' order by Date,session"; OleDbCommand cmd = new OleDbCommand(sql,GFun.OleDbCon); cmd.CommandType = CommandType.Text; OleDbDataAdapter oleda = new OleDbDataAdapter(cmd); DataTable dt = new DataTable(); oleda.Fill(dt); DGV_Course_report.DataSource = dt; catch (Exception ex1) { MessageBox.Show(ex1.ToString(), "Error", MessageBoxButtons.OK); } }
DGV_Course_report.DataSource = dt;
DGV_Course_report.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)