I am using this code to populate to datagridview but nothing is happening and when I try DataBind() at the end it throws an error (dataGridView does not contain a definition for DataBind)
sql_connection =
new SqlConnection("Data Source=.\\SQLEXPRESS;initial catalog=ws2connect;integrated security=true");sql_command =
new SqlCommand("sp_get_customers", sql_connection);sql_command.CommandType =
CommandType.StoredProcedure;sql_command.Parameters.Add(
"@id_number", SqlDbType.VarChar).Value = "%731%";sql_connection.Open();
sql_reader = sql_command.ExecuteReader(
CommandBehavior.CloseConnection);dataResult.DataSource = sql_reader;