Cant reach the datagridview1 control
Hi,
Im facing a weird problem. I am just adding a DataGridView control to my program's interface. Then I am passing the Form1.cs then wanna write some codes with this control but VS can not see this control. I mean can not identify. All codes below ;
------------------------------------
private void button1_Click(object sender, EventArgs e)
{
string query = "Data Source=1.1.1.1;Initial Catalog=mdb;User Id=user;Password=qweasd;";
SqlConnection conn = new SqlConnection(query);
conn.Open();
DataTable data_table = new DataTable();
SqlDataAdapter sql_adapter = new SqlDataAdapter("SELECT * FROM table", conn);
sql_adapter.Fill(data_table);
datagridview1.Fill ...... --> I cant fill dataadapter to gridview..
------------------------------------