Mageshwaran R

Mageshwaran R

  • NA
  • 10.8k
  • 1.1m

how to show database values to datagrid

Dec 4 2018 8:03 AM
Sqlquery Oconnect = new Sqlquery();
SqlCommand Ocmd = new SqlCommand("SELECT *FROM REGISTERNAMES", Oconnect.Openconnection());
SqlDataAdapter Oadp= new SqlDataAdapter(Ocmd);
DataTable Odt = new DataTable();
Oadp.Fill(Odt);
DataGrd.DataContext= Odt.AsDataView();
----------------------------------------------------------------------------------
Hi,I am basic learner,this code is working but not showing database value in datagrid..
only blank row is insert...
 
 

Answers (2)