private void button1_Click(object sender, EventArgs e) { DataTable dt= new DataTable(); dt.Columns.Add("ID"); dt.Columns.Add("Name"); for(int i =0;i<10;i++) { dt.Rows.Add("Id"+i,"NAME"+i); } dataGridView1.DataSource = dt; gridControl1.DataSource = dt; gridControl2.DataSource = dt; gridView1.OptionsSelection.EnableAppearanceFocusedRow = false; FormEPEDEXCEL frm = new FormEPEDEXCEL(); frm.Show(); }
private void button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); dt.Columns.Add("ID"); dt.Columns.Add("Name"); for (int i = 0; i < 10; i++) { dt.Rows.Add("Id" + i, "NAME" + i); } dataGridView1.DataSource = dt; gridControl1.DataSource = dt; gridControl2.DataSource = dt; gridView1.OptionsSelection.EnableAppearanceFocusedRow = false; FormEPEDEXCEL frm = new FormEPEDEXCEL(); frm.Show(); }