Is it at all posible to fill a dataGridView Column with say a textbox.text text?
So if i have a Column in my dataGridView named "Cost" and my textBox1.Text = "200"
It will fill the whole "Cost" Column all the Column Cells with = "200"?
This is how I get my Data for the DataGrid:
private void GetData(string selectCommand)
{
try
{
string conectioninfo = Properties.Settings.Default.finemanConnectionString;
connection = new MySqlConnection(conectioninfo);
da = new MySqlDataAdapter(selectCommand, connection);
MySqlCommandBuilder commandBuilder = new MySqlCommandBuilder(da);
dataGridView1.AutoGenerateColumns = false;
DataTable table = new DataTable();
table.Locale = System.Globalization.CultureInfo.InvariantCulture;
da.Fill(table);
binder.DataSource = table;
dataGridView1.DataSource = this.binder;
SetupColumns(table);
}
Now The Column call Cost will not be in the BindingSource but still need to bee added into a seperate column called "Cost"
Any advice is appreciated.
Thanks