1
Answer

how to fill textbox with DGV column Content ?

Ask a question
hello 
how to fill textbox or richtextbox or combobox  with datagridview column content
 this is my code 
 
static public void refresh(DataGridView datagridview)
{
try
{
if (Connection.State == ConnectionState.Closed)
Connection.Open();
MySqlDataAdapter dataadapter = new MySqlDataAdapter("SELECT * FROM suTable", Connection);
DataTable dt = new DataTable();
dataadapter.Fill(dt);
datagridview.DataSource = dt;
}
catch (MySqlException Exception)
{
MessageBox.Show(Exception.ToString());
}
finally
{
Connection.Close();
}
 

Answers (1)