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); }
table.Columns.Add("Cost", typeof(decimal)); foreach (DataRow row in table.Rows) { row["Cost"] = 100; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)