コード例 #1
0
        private void toolStripMenuItem16_Click(object sender, EventArgs e)
        {
            var editTool = dataGridViewShop.SelectedRows[0].DataBoundItem as CommissionShop;
            AddCommissionShopForm adcsf = new AddCommissionShopForm(editTool);

            if (adcsf.ShowDialog() == DialogResult.OK)
            {
                commissionShopBindingSource.ResetBindings(false);
                art.isChangeData = true;
            }
        }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (adc.ShowDialog() == DialogResult.OK)
     {
         art.AddComShop(adc.comshop);
         commissionShopBindingSource.ResetBindings(false);
         art.isChangeData = true;
         var lastIdx = dataGridViewShop.Rows.Count - 1;
         dataGridViewShop.Rows[lastIdx].Selected          = true;
         dataGridViewShop.FirstDisplayedScrollingRowIndex = lastIdx;
     }
 }