private void button3_Click object sender EventArgs Отмена cur_table co

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
private void button3_Click(object sender, EventArgs e) // Отмена
{
cur_table = comboBox1.Text;
dataGridView1.ReadOnly = false;
dt = querry.getTable("select * from " + cur_table + ";");
dataGridView1.DataSource = dt;
if (dataGridView1.ColumnCount != 0)
{
dataGridView1.Columns[0].ReadOnly = true;
for (int i = 0; i < dataGridView1.ColumnCount; i++)
{
DataGridViewColumn column = dataGridView1.Columns[i];
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
}
}
}