private void button1_Click(object sender, EventArgs e)
{
displaygrid.DataSource = null;
cmd.CommandText= "selectregid,studname,regno,classname,dob,sex,parent,houseno,place1,place2,city,phono,mobno,office,offplace1,offplace2,offcity,offpho,offmob,fax,nationalty,busno from registration r inner join class c on r.classid = c.classid inner join bus b on r.busid = b.busid where r.Studname='" + textBox1.Text + "'";
da.SelectCommand = cmd;
da.Fill(ds, "name");
DataTable dt1 = ds.Tables["name"];
//dt.Clear();
displaygrid.DataSource = dt1;
}